@halcyonlabs/app 0.47.0-halcyon.604 → 0.47.0-halcyon.607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/dist/assets/{AddMachineDialog-BHF-GkBG.js → AddMachineDialog-CG2ZZhp-.js} +1 -1
- package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.br +0 -0
- package/app/dist/assets/AddMachineDialog-CG2ZZhp-.js.gz +0 -0
- package/app/dist/assets/{AppCommandShortcutHint-7JPI7Au-.js → AppCommandShortcutHint-CCVkbqD1.js} +1 -1
- package/app/dist/assets/{AppFileExternalNavigationDispatcher-BNbJsP1g.js → AppFileExternalNavigationDispatcher-DETVZfBW.js} +1 -1
- package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.br +0 -0
- package/app/dist/assets/AppFileExternalNavigationDispatcher-DETVZfBW.js.gz +0 -0
- package/app/dist/assets/{AppToasterView-DP33gZcS.js → AppToasterView-BpJaGVQ1.js} +1 -1
- package/app/dist/assets/{BrowserTabDeck-BlOoU-vR.js → BrowserTabDeck-c6VRKA-g.js} +1 -1
- package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.br +0 -0
- package/app/dist/assets/BrowserTabDeck-c6VRKA-g.js.gz +0 -0
- package/app/dist/assets/{CommandPaletteBody-CBbTgLrW.js → CommandPaletteBody-BeiWvSTK.js} +1 -1
- package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.br +0 -0
- package/app/dist/assets/CommandPaletteBody-BeiWvSTK.js.gz +0 -0
- package/app/dist/assets/{DiffHost-DYBSO1_c.js → DiffHost-xesYsZUt.js} +1 -1
- package/app/dist/assets/DiffHost-xesYsZUt.js.br +0 -0
- package/app/dist/assets/DiffHost-xesYsZUt.js.gz +0 -0
- package/app/dist/assets/{ExperimentalFileLinkMenu-DO2lGQoK.js → ExperimentalFileLinkMenu-CDVoETHe.js} +1 -1
- package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.br +0 -0
- package/app/dist/assets/ExperimentalFileLinkMenu-CDVoETHe.js.gz +0 -0
- package/app/dist/assets/{FilePreview-ORcgsTax.js → FilePreview-CzacGZ35.js} +1 -1
- package/app/dist/assets/FilePreview-CzacGZ35.js.br +0 -0
- package/app/dist/assets/FilePreview-CzacGZ35.js.gz +0 -0
- package/app/dist/assets/{GitDiffCardHeader-i4vt7tT5.js → GitDiffCardHeader-CJtFaq1K.js} +1 -1
- package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.br +0 -0
- package/app/dist/assets/GitDiffCardHeader-CJtFaq1K.js.gz +0 -0
- package/app/dist/assets/{InlineMessageEditorFrame-y089xCLP.js → InlineMessageEditorFrame-C0rqOlNn.js} +1 -1
- package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.br +0 -0
- package/app/dist/assets/InlineMessageEditorFrame-C0rqOlNn.js.gz +0 -0
- package/app/dist/assets/{MachineLabel-D07WUIMh.js → MachineLabel-vUI5j8ve.js} +1 -1
- package/app/dist/assets/MachineLabel-vUI5j8ve.js.br +0 -0
- package/app/dist/assets/MachineLabel-vUI5j8ve.js.gz +0 -0
- package/app/dist/assets/{MachineRenameDialog-RyrwvNas.js → MachineRenameDialog-CrnZuppe.js} +1 -1
- package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.br +0 -0
- package/app/dist/assets/MachineRenameDialog-CrnZuppe.js.gz +0 -0
- package/app/dist/assets/{MachineSettingsView-Bg6Op62W.js → MachineSettingsView-BR6qseai.js} +1 -1
- package/app/dist/assets/MachineSettingsView-BR6qseai.js.br +0 -0
- package/app/dist/assets/MachineSettingsView-BR6qseai.js.gz +0 -0
- package/app/dist/assets/{MicrophonePreferences-DwsTYfON.js → MicrophonePreferences-wMQ36e_Q.js} +1 -1
- package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.br +0 -0
- package/app/dist/assets/MicrophonePreferences-wMQ36e_Q.js.gz +0 -0
- package/app/dist/assets/{ModelReasoningMenu-Dth3XXm8.js → ModelReasoningMenu-Do0jyo5Q.js} +1 -1
- package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.br +0 -0
- package/app/dist/assets/ModelReasoningMenu-Do0jyo5Q.js.gz +0 -0
- package/app/dist/assets/{MoonletDiff-Da65ABAI.js → MoonletDiff-CCvaiEEC.js} +1 -1
- package/app/dist/assets/MoonletDiff-CCvaiEEC.js.br +0 -0
- package/app/dist/assets/MoonletDiff-CCvaiEEC.js.gz +0 -0
- package/app/dist/assets/{MoonletDiffSplit-Phl7m23w.js → MoonletDiffSplit-3xEwFpfu.js} +2 -2
- package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.br +0 -0
- package/app/dist/assets/MoonletDiffSplit-3xEwFpfu.js.gz +0 -0
- package/app/dist/assets/{MoonletSourceCode-C5aa88dK.js → MoonletSourceCode-BgaVW-e6.js} +1 -1
- package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.br +0 -0
- package/app/dist/assets/MoonletSourceCode-BgaVW-e6.js.gz +0 -0
- package/app/dist/assets/{NewTabPage-BKkv1maV.js → NewTabPage-BOqCqqLe.js} +1 -1
- package/app/dist/assets/NewTabPage-BOqCqqLe.js.br +0 -0
- package/app/dist/assets/NewTabPage-BOqCqqLe.js.gz +0 -0
- package/app/dist/assets/{NewThreadComposer-00DY4i8k.js → NewThreadComposer-DyB52pmS.js} +1 -1
- package/app/dist/assets/NewThreadComposer-DyB52pmS.js.br +0 -0
- package/app/dist/assets/NewThreadComposer-DyB52pmS.js.gz +0 -0
- package/app/dist/assets/{OnboardingFlow-GwpuTTqu.js → OnboardingFlow-DTPixZrb.js} +1 -1
- package/app/dist/assets/OnboardingFlow-DTPixZrb.js.br +0 -0
- package/app/dist/assets/OnboardingFlow-DTPixZrb.js.gz +0 -0
- package/app/dist/assets/{OptionPicker-Cy_W5NWS.js → OptionPicker-CxOGHDd8.js} +1 -1
- package/app/dist/assets/OptionPicker-CxOGHDd8.js.br +0 -0
- package/app/dist/assets/OptionPicker-CxOGHDd8.js.gz +0 -0
- package/app/dist/assets/{PaletteShell-CRwrb4lb.js → PaletteShell-BMkwhUdz.js} +1 -1
- package/app/dist/assets/PaletteShell-BMkwhUdz.js.br +0 -0
- package/app/dist/assets/PaletteShell-BMkwhUdz.js.gz +0 -0
- package/app/dist/assets/{PaneMaximizeButton-CMp4cCoZ.js → PaneMaximizeButton-DgXn2p5T.js} +1 -1
- package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.br +0 -0
- package/app/dist/assets/PaneMaximizeButton-DgXn2p5T.js.gz +0 -0
- package/app/dist/assets/{PierreLineSelectionActions-BXbCJV8P.js → PierreLineSelectionActions-V_GPrVau.js} +1 -1
- package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.br +0 -0
- package/app/dist/assets/PierreLineSelectionActions-V_GPrVau.js.gz +0 -0
- package/app/dist/assets/{PluginPanelRightPanelHost-CuKRaAaL.js → PluginPanelRightPanelHost-CRDSntoM.js} +1 -1
- package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.br +0 -0
- package/app/dist/assets/PluginPanelRightPanelHost-CRDSntoM.js.gz +0 -0
- package/app/dist/assets/{PluginSettingsSections-DJo5h7Qh.js → PluginSettingsSections-ZnUNrvlJ.js} +1 -1
- package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.br +0 -0
- package/app/dist/assets/PluginSettingsSections-ZnUNrvlJ.js.gz +0 -0
- package/app/dist/assets/{PluginThreadChat-BV6OMCzu.js → PluginThreadChat-DtIyKaqq.js} +1 -1
- package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.br +0 -0
- package/app/dist/assets/PluginThreadChat-DtIyKaqq.js.gz +0 -0
- package/app/dist/assets/{ProjectDetailSettingsView-DdF6YsSg.js → ProjectDetailSettingsView-B3apTKMj.js} +1 -1
- package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.br +0 -0
- package/app/dist/assets/ProjectDetailSettingsView-B3apTKMj.js.gz +0 -0
- package/app/dist/assets/{ProjectMachineSetupDialog-CtbI4XxM.js → ProjectMachineSetupDialog-C43S09Ex.js} +1 -1
- package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.br +0 -0
- package/app/dist/assets/ProjectMachineSetupDialog-C43S09Ex.js.gz +0 -0
- package/app/dist/assets/{ProjectsSettingsSection-BT1kXbPn.js → ProjectsSettingsSection-CIshX8Xc.js} +1 -1
- package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.br +0 -0
- package/app/dist/assets/ProjectsSettingsSection-CIshX8Xc.js.gz +0 -0
- package/app/dist/assets/{QueuedMessagesList-D1aAchqp.js → QueuedMessagesList-Dh5dxmNK.js} +1 -1
- package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.br +0 -0
- package/app/dist/assets/QueuedMessagesList-Dh5dxmNK.js.gz +0 -0
- package/app/dist/assets/{RemotePathBrowser-vPIL8lVm.js → RemotePathBrowser-1A5-qAxD.js} +1 -1
- package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.br +0 -0
- package/app/dist/assets/RemotePathBrowser-1A5-qAxD.js.gz +0 -0
- package/app/dist/assets/{RootComposeView-DV6JGFlA.js → RootComposeView-BIZpqYG3.js} +1 -1
- package/app/dist/assets/RootComposeView-BIZpqYG3.js.br +0 -0
- package/app/dist/assets/RootComposeView-BIZpqYG3.js.gz +0 -0
- package/app/dist/assets/{SecondaryPanelLayout-BpHDgFJ_.js → SecondaryPanelLayout-BIQDxJLi.js} +1 -1
- package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.br +0 -0
- package/app/dist/assets/SecondaryPanelLayout-BIQDxJLi.js.gz +0 -0
- package/app/dist/assets/{ServerMoveOverlayView-CGkGzv8t.js → ServerMoveOverlayView-BSJahQeB.js} +1 -1
- package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.br +0 -0
- package/app/dist/assets/ServerMoveOverlayView-BSJahQeB.js.gz +0 -0
- package/app/dist/assets/{SettingsSidebar-1XC0Uxwo.js → SettingsSidebar-DY_kbv4v.js} +1 -1
- package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.br +0 -0
- package/app/dist/assets/SettingsSidebar-DY_kbv4v.js.gz +0 -0
- package/app/dist/assets/SettingsView-CR1GzBCl.js +7 -0
- package/app/dist/assets/SettingsView-CR1GzBCl.js.br +0 -0
- package/app/dist/assets/SettingsView-CR1GzBCl.js.gz +0 -0
- package/app/dist/assets/{SidebarFooterCustomize-D7sLYPwD.js → SidebarFooterCustomize-pIj856Zr.js} +1 -1
- package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.br +0 -0
- package/app/dist/assets/SidebarFooterCustomize-pIj856Zr.js.gz +0 -0
- package/app/dist/assets/{SidebarVisibilityCustomize-DpTzFoGl.js → SidebarVisibilityCustomize-CR7hQOIF.js} +1 -1
- package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.br +0 -0
- package/app/dist/assets/SidebarVisibilityCustomize-CR7hQOIF.js.gz +0 -0
- package/app/dist/assets/{SourceCodeHost-DVEXLJK1.js → SourceCodeHost-DkoXO-RM.js} +2 -2
- package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.br +0 -0
- package/app/dist/assets/SourceCodeHost-DkoXO-RM.js.gz +0 -0
- package/app/dist/assets/{SplitWorkspaceRoute-BfxQQdOx.js → SplitWorkspaceRoute-DN3j-Nio.js} +2 -2
- package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.br +0 -0
- package/app/dist/assets/SplitWorkspaceRoute-DN3j-Nio.js.gz +0 -0
- package/app/dist/assets/{TerminalOutputBlock-COQNamKR.js → TerminalOutputBlock-DKsNjK8s.js} +1 -1
- package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.br +0 -0
- package/app/dist/assets/TerminalOutputBlock-DKsNjK8s.js.gz +0 -0
- package/app/dist/assets/{ThreadActionsMenu-064Gcy7T.js → ThreadActionsMenu-BulopjpY.js} +1 -1
- package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.br +0 -0
- package/app/dist/assets/ThreadActionsMenu-BulopjpY.js.gz +0 -0
- package/app/dist/assets/{ThreadDetailView-CjoXzweq.js → ThreadDetailView-C6cu9JmT.js} +3 -3
- package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.br +0 -0
- package/app/dist/assets/ThreadDetailView-C6cu9JmT.js.gz +0 -0
- package/app/dist/assets/{ThreadSearchPaletteMode-CwdePsHK.js → ThreadSearchPaletteMode-D0MKJ8PL.js} +1 -1
- package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.br +0 -0
- package/app/dist/assets/ThreadSearchPaletteMode-D0MKJ8PL.js.gz +0 -0
- package/app/dist/assets/{ThreadSecondaryPanel-CtYtgTla.js → ThreadSecondaryPanel-CzjhigwP.js} +1 -1
- package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.br +0 -0
- package/app/dist/assets/ThreadSecondaryPanel-CzjhigwP.js.gz +0 -0
- package/app/dist/assets/{ThreadSecondaryPanelTabContent-BNQi8b2n.js → ThreadSecondaryPanelTabContent-BX5A98YK.js} +1 -1
- package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.br +0 -0
- package/app/dist/assets/ThreadSecondaryPanelTabContent-BX5A98YK.js.gz +0 -0
- package/app/dist/assets/{ThreadStatusGlyph-DxxHDn0P.js → ThreadStatusGlyph-BYavMHiP.js} +1 -1
- package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.br +0 -0
- package/app/dist/assets/ThreadStatusGlyph-BYavMHiP.js.gz +0 -0
- package/app/dist/assets/{ThreadTerminalPanel-fb5Kk0KG.js → ThreadTerminalPanel-Cfe76daj.js} +1 -1
- package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.br +0 -0
- package/app/dist/assets/ThreadTerminalPanel-Cfe76daj.js.gz +0 -0
- package/app/dist/assets/{ThreadTerminalView-BiGdt3Fd.js → ThreadTerminalView-CgMKh6rk.js} +1 -1
- package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.br +0 -0
- package/app/dist/assets/ThreadTerminalView-CgMKh6rk.js.gz +0 -0
- package/app/dist/assets/{ThreadTimelineNavigationContext-epkIpS1J.js → ThreadTimelineNavigationContext-2--wIUmU.js} +2 -2
- package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.br +0 -0
- package/app/dist/assets/ThreadTimelineNavigationContext-2--wIUmU.js.gz +0 -0
- package/app/dist/assets/{ThreadUnarchiveButton-CExEP4wZ.js → ThreadUnarchiveButton-CiDbuPzJ.js} +1 -1
- package/app/dist/assets/{TimelineDetailScroll-D8gge5Y9.js → TimelineDetailScroll-DnMC8nYC.js} +1 -1
- package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.br +0 -0
- package/app/dist/assets/TimelineDetailScroll-DnMC8nYC.js.gz +0 -0
- package/app/dist/assets/{TimelineFileDiffBlock-BJt7kifl.js → TimelineFileDiffBlock-D8pKEcE0.js} +1 -1
- package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.br +0 -0
- package/app/dist/assets/TimelineFileDiffBlock-D8pKEcE0.js.gz +0 -0
- package/app/dist/assets/{TimelineSelectionMenu-DrK39LAT.js → TimelineSelectionMenu-DDYrgVgK.js} +1 -1
- package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.br +0 -0
- package/app/dist/assets/TimelineSelectionMenu-DDYrgVgK.js.gz +0 -0
- package/app/dist/assets/{ToolsView-4tUvUv2U.js → ToolsView-CXmmNmMz.js} +1 -1
- package/app/dist/assets/ToolsView-CXmmNmMz.js.br +0 -0
- package/app/dist/assets/ToolsView-CXmmNmMz.js.gz +0 -0
- package/app/dist/assets/{ToolsViewSplits-BWOxgNc1.js → ToolsViewSplits-VIMb0WxO.js} +2 -2
- package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.br +0 -0
- package/app/dist/assets/ToolsViewSplits-VIMb0WxO.js.gz +0 -0
- package/app/dist/assets/{WaveformVisualizer-C1SzIkiu.js → WaveformVisualizer-CyOfIcDU.js} +1 -1
- package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.br +0 -0
- package/app/dist/assets/WaveformVisualizer-CyOfIcDU.js.gz +0 -0
- package/app/dist/assets/{absolute-file-path-CbI5cppS.js → absolute-file-path-BxWHDkiV.js} +1 -1
- package/app/dist/assets/{app-fixed-tab-navigation-Cv4Tj7xZ.js → app-fixed-tab-navigation-nG5duhr6.js} +1 -1
- package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.br +0 -0
- package/app/dist/assets/app-fixed-tab-navigation-nG5duhr6.js.gz +0 -0
- package/app/dist/assets/{audio-input-device-preference-D8tr0bqw.js → audio-input-device-preference-Civxk2e_.js} +1 -1
- package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.br +0 -0
- package/app/dist/assets/audio-input-device-preference-Civxk2e_.js.gz +0 -0
- package/app/dist/assets/{bottom-anchored-scroll-body-VYrnz8Hl.js → bottom-anchored-scroll-body-izL_2xQo.js} +1 -1
- package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.br +0 -0
- package/app/dist/assets/bottom-anchored-scroll-body-izL_2xQo.js.gz +0 -0
- package/app/dist/assets/{browser-url-jhAVtSw2.js → browser-url-DQsPFWqd.js} +1 -1
- package/app/dist/assets/browser-url-DQsPFWqd.js.br +0 -0
- package/app/dist/assets/browser-url-DQsPFWqd.js.gz +0 -0
- package/app/dist/assets/{checkbox-qaQbU8-H.js → checkbox-Dxs9oAMl.js} +1 -1
- package/app/dist/assets/checkbox-Dxs9oAMl.js.br +0 -0
- package/app/dist/assets/checkbox-Dxs9oAMl.js.gz +0 -0
- package/app/dist/assets/{code-loading-skeletons-pfQDO26Y.js → code-loading-skeletons-CkiXPS0M.js} +1 -1
- package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.br +0 -0
- package/app/dist/assets/code-loading-skeletons-CkiXPS0M.js.gz +0 -0
- package/app/dist/assets/{code-rendering-CuFk1qJ1.js → code-rendering-DjLdb6cB.js} +1 -1
- package/app/dist/assets/{code-theme-registration-wCS4GRn4.js → code-theme-registration-DWaGQiqG.js} +1 -1
- package/app/dist/assets/{detail-card-C3OH86kJ.js → detail-card-BFm1NEQz.js} +1 -1
- package/app/dist/assets/detail-card-BFm1NEQz.js.br +0 -0
- package/app/dist/assets/detail-card-BFm1NEQz.js.gz +0 -0
- package/app/dist/assets/{diff-stats-tally-DkIHmiEl.js → diff-stats-tally-DQHS3tHN.js} +1 -1
- package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.br +0 -0
- package/app/dist/assets/diff-stats-tally-DQHS3tHN.js.gz +0 -0
- package/app/dist/assets/{dist-CWXlD45B.js → dist-DCULoGTS.js} +1 -1
- package/app/dist/assets/dist-DCULoGTS.js.br +0 -0
- package/app/dist/assets/dist-DCULoGTS.js.gz +0 -0
- package/app/dist/assets/{environment-mutations-BrA6u8Ev.js → environment-mutations-Zes88JN-.js} +1 -1
- package/app/dist/assets/environment-mutations-Zes88JN-.js.br +0 -0
- package/app/dist/assets/environment-mutations-Zes88JN-.js.gz +0 -0
- package/app/dist/assets/{environment-workspace-display-0oqBMXMB.js → environment-workspace-display-Blt7U9Mn.js} +3 -3
- package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.br +0 -0
- package/app/dist/assets/environment-workspace-display-Blt7U9Mn.js.gz +0 -0
- package/app/dist/assets/{event-code-block-BfPSBXNn.js → event-code-block-QXnzoFqm.js} +1 -1
- package/app/dist/assets/event-code-block-QXnzoFqm.js.br +0 -0
- package/app/dist/assets/event-code-block-QXnzoFqm.js.gz +0 -0
- package/app/dist/assets/{expandable-text-01SvfXRm.js → expandable-text-DkUA9RQT.js} +1 -1
- package/app/dist/assets/expandable-text-DkUA9RQT.js.br +0 -0
- package/app/dist/assets/expandable-text-DkUA9RQT.js.gz +0 -0
- package/app/dist/assets/{file-opener-preference-C5_P-Zfr.js → file-opener-preference-CXZHmESv.js} +1 -1
- package/app/dist/assets/{file-path-link-Ddg7Fzor.js → file-path-link-D7DFjBWZ.js} +1 -1
- package/app/dist/assets/file-path-link-D7DFjBWZ.js.br +0 -0
- package/app/dist/assets/file-path-link-D7DFjBWZ.js.gz +0 -0
- package/app/dist/assets/{host-mutations-CAtir6jv.js → host-mutations-Fl0RjER0.js} +1 -1
- package/app/dist/assets/host-mutations-Fl0RjER0.js.br +0 -0
- package/app/dist/assets/host-mutations-Fl0RjER0.js.gz +0 -0
- package/app/dist/assets/{icon-extended-D2fR2GTF.js → icon-extended-C0LTNXfN.js} +1 -1
- package/app/dist/assets/icon-extended-C0LTNXfN.js.br +0 -0
- package/app/dist/assets/icon-extended-C0LTNXfN.js.gz +0 -0
- package/app/dist/assets/{image-lightbox-Dhmri6WK.js → image-lightbox-DhNslR-8.js} +1 -1
- package/app/dist/assets/image-lightbox-DhNslR-8.js.br +0 -0
- package/app/dist/assets/image-lightbox-DhNslR-8.js.gz +0 -0
- package/app/dist/assets/index-C2K528W0.css +2 -0
- package/app/dist/assets/index-C2K528W0.css.br +0 -0
- package/app/dist/assets/index-C2K528W0.css.gz +0 -0
- package/app/dist/assets/{index-CfvM6UcU.js → index-DCps_qBD.js} +8 -8
- package/app/dist/assets/index-DCps_qBD.js.br +0 -0
- package/app/dist/assets/index-DCps_qBD.js.gz +0 -0
- package/app/dist/assets/{inline-rename-editor-Bg8SXoZ3.js → inline-rename-editor-nrH2d_Gy.js} +1 -1
- package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.br +0 -0
- package/app/dist/assets/inline-rename-editor-nrH2d_Gy.js.gz +0 -0
- package/app/dist/assets/{launcherRow-CqPaUYWn.js → launcherRow-CVYGyeOl.js} +1 -1
- package/app/dist/assets/launcherRow-CVYGyeOl.js.br +0 -0
- package/app/dist/assets/launcherRow-CVYGyeOl.js.gz +0 -0
- package/app/dist/assets/{localhost-link-rewrite-description-DP-bXSL8.js → localhost-link-rewrite-description-C0FphFZq.js} +1 -1
- package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.br +0 -0
- package/app/dist/assets/localhost-link-rewrite-description-C0FphFZq.js.gz +0 -0
- package/app/dist/assets/{machine-provider-queries-CoghZyj9.js → machine-provider-queries-BTz8Sz3J.js} +1 -1
- package/app/dist/assets/{machine-server-access-Drk0mdHH.js → machine-server-access-CGfd5e1r.js} +1 -1
- package/app/dist/assets/{markdown-file-image-routing-BJjI1Te3.js → markdown-file-image-routing-BhGjphhz.js} +1 -1
- package/app/dist/assets/{markdown-html-BU8qsXmq.js → markdown-html-CLi3FhDR.js} +1 -1
- package/app/dist/assets/markdown-html-CLi3FhDR.js.br +0 -0
- package/app/dist/assets/markdown-html-CLi3FhDR.js.gz +0 -0
- package/app/dist/assets/{markdown-local-file-link-D-MSnVWD.js → markdown-local-file-link-BROpdQPF.js} +1 -1
- package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.br +0 -0
- package/app/dist/assets/markdown-local-file-link-BROpdQPF.js.gz +0 -0
- package/app/dist/assets/{markdown-preview-BLL1QuNp.js → markdown-preview-CGXXNhJo.js} +3 -3
- package/app/dist/assets/markdown-preview-CGXXNhJo.js.br +0 -0
- package/app/dist/assets/markdown-preview-CGXXNhJo.js.gz +0 -0
- package/app/dist/assets/{markdown-prompt-mentions-B5LVmCbO.js → markdown-prompt-mentions-CPWKCtMa.js} +1 -1
- package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.br +0 -0
- package/app/dist/assets/markdown-prompt-mentions-CPWKCtMa.js.gz +0 -0
- package/app/dist/assets/{model-load-error-message-Dmp1hUNg.js → model-load-error-message-CH_k4E7q.js} +1 -1
- package/app/dist/assets/model-load-error-message-CH_k4E7q.js.br +0 -0
- package/app/dist/assets/model-load-error-message-CH_k4E7q.js.gz +0 -0
- package/app/dist/assets/onboarding-telemetry-BXIyQ5F4.js +1 -0
- package/app/dist/assets/{open-in-editor-button-D0wnpT6x.js → open-in-editor-button-tA10Nkqn.js} +1 -1
- package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.br +0 -0
- package/app/dist/assets/open-in-editor-button-tA10Nkqn.js.gz +0 -0
- package/app/dist/assets/{page-shell-CgSxnF9m.js → page-shell-CNCVT3Uj.js} +1 -1
- package/app/dist/assets/page-shell-CNCVT3Uj.js.br +0 -0
- package/app/dist/assets/page-shell-CNCVT3Uj.js.gz +0 -0
- package/app/dist/assets/{pierre-worker-pool-CHGWu76e.js → pierre-worker-pool-pXJFsMd7.js} +1 -1
- package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.br +0 -0
- package/app/dist/assets/pierre-worker-pool-pXJFsMd7.js.gz +0 -0
- package/app/dist/assets/{plugin-detail-navigation-DuR8_JCx.js → plugin-detail-navigation-SAqiVR3K.js} +1 -1
- package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.br +0 -0
- package/app/dist/assets/plugin-detail-navigation-SAqiVR3K.js.gz +0 -0
- package/app/dist/assets/{plugin-frontend-D5ijLuKC.js → plugin-frontend-DoWZV45B.js} +3 -3
- package/app/dist/assets/plugin-frontend-DoWZV45B.js.br +0 -0
- package/app/dist/assets/plugin-frontend-DoWZV45B.js.gz +0 -0
- package/app/dist/assets/{plugin-ui-Dpa8hcuk.js → plugin-ui-Cu8MrXLJ.js} +1 -1
- package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.br +0 -0
- package/app/dist/assets/plugin-ui-Cu8MrXLJ.js.gz +0 -0
- package/app/dist/assets/{project-default-execution-options-query-DfOIRKKL.js → project-default-execution-options-query-gaQEWNK0.js} +1 -1
- package/app/dist/assets/{queued-editor-typeahead-layout-Czaq8Cl9.js → queued-editor-typeahead-layout-DTUSPVuA.js} +1 -1
- package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.br +0 -0
- package/app/dist/assets/queued-editor-typeahead-layout-DTUSPVuA.js.gz +0 -0
- package/app/dist/assets/{queued-messages-layout-B5xwiued.js → queued-messages-layout-Bj1foecI.js} +1 -1
- package/app/dist/assets/queued-messages-layout-Bj1foecI.js.br +0 -0
- package/app/dist/assets/queued-messages-layout-Bj1foecI.js.gz +0 -0
- package/app/dist/assets/{resource-list-BKpxiO2e.js → resource-list-DLZLjUCf.js} +1 -1
- package/app/dist/assets/resource-list-DLZLjUCf.js.br +0 -0
- package/app/dist/assets/resource-list-DLZLjUCf.js.gz +0 -0
- package/app/dist/assets/root-compose-create-preference-Bv_dFEsH.js +1 -0
- package/app/dist/assets/{save-file-CNFl2iiR.js → save-file-B8sl9wgP.js} +1 -1
- package/app/dist/assets/{settings-nav-C9-jh_HN.js → settings-nav-D5tWYG52.js} +1 -1
- package/app/dist/assets/settings-nav-D5tWYG52.js.br +0 -0
- package/app/dist/assets/settings-nav-D5tWYG52.js.gz +0 -0
- package/app/dist/assets/{settings-sections-BMr_XU5l.js → settings-sections-Dfo35J2q.js} +1 -1
- package/app/dist/assets/settings-sections-Dfo35J2q.js.br +0 -0
- package/app/dist/assets/settings-sections-Dfo35J2q.js.gz +0 -0
- package/app/dist/assets/{shortcut-pill-_XSUZHxZ.js → shortcut-pill-BMlNncTw.js} +1 -1
- package/app/dist/assets/{sidebarTouchSensor-DG_A1RmT.js → sidebarTouchSensor-Da_E8eSx.js} +1 -1
- package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.br +0 -0
- package/app/dist/assets/sidebarTouchSensor-Da_E8eSx.js.gz +0 -0
- package/app/dist/assets/{switch-BjJ8825r.js → switch-BRYzbFH-.js} +1 -1
- package/app/dist/assets/switch-BRYzbFH-.js.br +0 -0
- package/app/dist/assets/switch-BRYzbFH-.js.gz +0 -0
- package/app/dist/assets/{textarea-DY_k-BJR.js → textarea-DpRLVuDl.js} +1 -1
- package/app/dist/assets/{thread-event-parser-ma5CGP66.js → thread-event-parser-BrLyjs4v.js} +1 -1
- package/app/dist/assets/thread-event-parser-BrLyjs4v.js.br +0 -0
- package/app/dist/assets/thread-event-parser-BrLyjs4v.js.gz +0 -0
- package/app/dist/assets/{thread-panel-queries-BXeOzk_6.js → thread-panel-queries-s8vzntf7.js} +1 -1
- package/app/dist/assets/thread-panel-queries-s8vzntf7.js.br +0 -0
- package/app/dist/assets/thread-panel-queries-s8vzntf7.js.gz +0 -0
- package/app/dist/assets/{thread-runtime-mutations-DmKkyel0.js → thread-runtime-mutations-BOdkZ-H-.js} +1 -1
- package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.br +0 -0
- package/app/dist/assets/thread-runtime-mutations-BOdkZ-H-.js.gz +0 -0
- package/app/dist/assets/{thread-terminal-queries-AFVZ5K6p.js → thread-terminal-queries-Blou76c_.js} +1 -1
- package/app/dist/assets/thread-terminal-queries-Blou76c_.js.br +0 -0
- package/app/dist/assets/thread-terminal-queries-Blou76c_.js.gz +0 -0
- package/app/dist/assets/{threadRecentItems-DXsdcpBk.js → threadRecentItems-BiCe3SkL.js} +1 -1
- package/app/dist/assets/threadRecentItems-BiCe3SkL.js.br +0 -0
- package/app/dist/assets/threadRecentItems-BiCe3SkL.js.gz +0 -0
- package/app/dist/assets/{threadWorkspaceOpenPath-DwKd-s_5.js → threadWorkspaceOpenPath-C9eC_XGN.js} +1 -1
- package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.br +0 -0
- package/app/dist/assets/threadWorkspaceOpenPath-C9eC_XGN.js.gz +0 -0
- package/app/dist/assets/{title-bar-scroll-fade-Dw_BPLyx.js → title-bar-scroll-fade-OrK4M84v.js} +1 -1
- package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.br +0 -0
- package/app/dist/assets/title-bar-scroll-fade-OrK4M84v.js.gz +0 -0
- package/app/dist/assets/{truncate-start-CGyRoGtG.js → truncate-start-Ck1IPV62.js} +1 -1
- package/app/dist/assets/{use-hover-popover-DzrAfLzd.js → use-hover-popover-uokpMJ80.js} +1 -1
- package/app/dist/assets/use-hover-popover-uokpMJ80.js.br +0 -0
- package/app/dist/assets/use-hover-popover-uokpMJ80.js.gz +0 -0
- package/app/dist/assets/{useElementWidth-Kv5FX-9C.js → useElementWidth-EbzKQ0bg.js} +1 -1
- package/app/dist/assets/useElementWidth-EbzKQ0bg.js.br +0 -0
- package/app/dist/assets/useElementWidth-EbzKQ0bg.js.gz +0 -0
- package/app/dist/assets/{useLocalOpenTargets-B7rqz64L.js → useLocalOpenTargets-CtvcdlZg.js} +1 -1
- package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.br +0 -0
- package/app/dist/assets/useLocalOpenTargets-CtvcdlZg.js.gz +0 -0
- package/app/dist/assets/{usePanelResizeSnap-Dizp45Ab.js → usePanelResizeSnap-CuwA4rg3.js} +1 -1
- package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.br +0 -0
- package/app/dist/assets/usePanelResizeSnap-CuwA4rg3.js.gz +0 -0
- package/app/dist/assets/{usePanelTerminals-ByzphxXd.js → usePanelTerminals-BZhTVWNX.js} +1 -1
- package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.br +0 -0
- package/app/dist/assets/usePanelTerminals-BZhTVWNX.js.gz +0 -0
- package/app/dist/assets/{usePathSuggestions-Bd5UhdCh.js → usePathSuggestions-DZ1XPM_t.js} +1 -1
- package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.br +0 -0
- package/app/dist/assets/usePathSuggestions-DZ1XPM_t.js.gz +0 -0
- package/app/dist/assets/{useResolvedLiveFileTarget-x5Gd-Gzx.js → useResolvedLiveFileTarget-DlZUgf7A.js} +1 -1
- package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.br +0 -0
- package/app/dist/assets/useResolvedLiveFileTarget-DlZUgf7A.js.gz +0 -0
- package/app/dist/assets/{useThreadTerminalController-CUnfO0Da.js → useThreadTerminalController-D4Cr2aY0.js} +1 -1
- package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.br +0 -0
- package/app/dist/assets/useThreadTerminalController-D4Cr2aY0.js.gz +0 -0
- package/app/dist/assets/{workspace-change-summary-CLNpSq_E.js → workspace-change-summary-C1EKX0Np.js} +1 -1
- package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.br +0 -0
- package/app/dist/assets/workspace-change-summary-C1EKX0Np.js.gz +0 -0
- package/app/dist/assets/{workspace-checkout-display-Aad1Wxi4.js → workspace-checkout-display-DRAc3j4u.js} +4 -4
- package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.br +0 -0
- package/app/dist/assets/workspace-checkout-display-DRAc3j4u.js.gz +0 -0
- package/app/dist/index.html +17 -17
- package/app/dist/index.html.br +0 -0
- package/app/dist/index.html.gz +0 -0
- package/dist/bb-app.js +1 -1
- package/dist/index.d.ts +64 -64
- package/dist/index.js +39 -34
- package/host-daemon/dist/bb +2 -2
- package/host-daemon/dist/daemon-bundle.mjs +9 -9
- package/host-daemon/dist/moonlet +2 -2
- package/host-daemon/dist/moonlet-chunks/{browser-LWDG5PCA.js → browser-3YADF5CZ.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-4BNITW7L.js → chunk-CJVCV7LA.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-5AOUW4I4.js → chunk-DYWN65E6.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-GUMXNH56.js → chunk-GJNT53PW.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/chunk-MNJOOMMT.js +2 -0
- package/host-daemon/dist/moonlet-chunks/{chunk-2QTAZF4P.js → chunk-OZFHGPH4.js} +2 -2
- package/host-daemon/dist/moonlet-chunks/{chunk-OW2VWWPF.js → chunk-UASCWFYV.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-3GDA5QRC.js → chunk-UBCGVKZ2.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-ZJ3M74CR.js → chunk-UZIJUXRX.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-I2TDLRZL.js → chunk-VRIDG567.js} +80 -80
- package/host-daemon/dist/moonlet-chunks/{chunk-LQ55GYT2.js → chunk-Z7UFAOBI.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{chunk-IRGDLZXQ.js → chunk-ZY4JRPPT.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{client-LVL2RUQ5.js → client-HJ57QVLD.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{commander-errors-RQKAT5HQ.js → commander-errors-VI7J6RNT.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{context-env-74PECPQU.js → context-env-C4YEBBVX.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{context-hints-GQMM7IUB.js → context-hints-FZ224BCX.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{diagnostics-GZNLDKFH.js → diagnostics-OU2KW3CN.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{environment-2OF5OYK6.js → environment-45XH2PJT.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{file-ICBUEP7H.js → file-OHC2H5AH.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{guide-I3LO3KWD.js → guide-T2HEZTCZ.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{machine-ZH4VN36Y.js → machine-7DB7FE7G.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{marketplace-72G2CIZT.js → marketplace-GSP2IPGS.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{permissions-ZKMW6XVA.js → permissions-SOZPETLR.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{plugin-J33MYYP6.js → plugin-672NQWPG.js} +26 -26
- package/host-daemon/dist/moonlet-chunks/{plugin-cli-proxy-KK4YO745.js → plugin-cli-proxy-YK6LMDCS.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{project-CAOBT6PT.js → project-KMNJH6RG.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{prompt-history-3CTG22DW.js → prompt-history-H3Y2IHDY.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{provider-T7SNTFH5.js → provider-EKKSYF2D.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{schedule-2G2I4DCW.js → schedule-KVSISSIR.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{server-R3LHIEJF.js → server-53I6IGAP.js} +2 -2
- package/host-daemon/dist/moonlet-chunks/{settings-WR7UCFPE.js → settings-MKGSGNIO.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{skill-GHMBJF4G.js → skill-DXINIPQ3.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{status-ES5SEMUE.js → status-BSMUYEAO.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{terminal-45KOGD2U.js → terminal-VKBGZFLN.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{theme-DEIR5VHK.js → theme-3YCCZBGC.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{thread-NNUIM6R7.js → thread-PFBPLD4F.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{updates-23J52P44.js → updates-OO7GE7UB.js} +1 -1
- package/host-daemon/dist/moonlet-chunks/{voice-CSQR656B.js → voice-ZJOSAJW7.js} +1 -1
- package/package.json +3 -3
- package/server/dist/builtin-plugins/account-pool/dist/app.js +9 -9
- package/server/dist/builtin-plugins/account-pool/skills/account-pool/SKILL.md +1 -1
- package/server/dist/builtin-plugins/agent-annotations/dist/app.js +2 -2
- package/server/dist/builtin-plugins/agent-board/dist/THIRD_PARTY_NOTICES.md +3 -3
- package/server/dist/builtin-plugins/agent-board/dist/app.js +6 -6
- package/server/dist/builtin-plugins/agent-board/dist/server.js +1 -1
- package/server/dist/builtin-plugins/ask-user-question/dist/app.js +6 -6
- package/server/dist/builtin-plugins/automations/dist/app.js +1 -1
- package/server/dist/builtin-plugins/automations/skills/automations/SKILL.md +1 -1
- package/server/dist/builtin-plugins/bb-account/dist/app.js +1 -1
- package/server/dist/builtin-plugins/bb-account/skills/bb-account/SKILL.md +1 -1
- package/server/dist/builtin-plugins/bb-ai/dist/server.js +2 -2
- package/server/dist/builtin-plugins/bb-ai/skills/bb-cloud-ai/SKILL.md +1 -1
- package/server/dist/builtin-plugins/bb-guide/dist/app.js +1 -1
- package/server/dist/builtin-plugins/bb-guide/dist/server.js +2 -2
- package/server/dist/builtin-plugins/bb-guide/package.json +2 -2
- package/server/dist/builtin-plugins/bb-guide/skills/bb-cli/SKILL.md +3 -3
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/SKILL.md +4 -4
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-events.md +2 -2
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/distribution.md +2 -2
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-components.md +4 -4
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/providers.md +3 -3
- package/server/dist/builtin-plugins/bb-guide/skills/bb-plugin-authoring/references/quickstart.md +10 -10
- package/server/dist/builtin-plugins/bb-guide/skills/skill-creator/SKILL.md +2 -2
- package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/SKILL.md +3 -3
- package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/marketplace-entry.md +8 -8
- package/server/dist/builtin-plugins/bb-guide/skills/submit-a-plugin/references/plugin-release.md +1 -1
- package/server/dist/builtin-plugins/browser-automation/dist/app.js +1 -1
- package/server/dist/builtin-plugins/browser-automation/dist/server.js +2 -2
- package/server/dist/builtin-plugins/browser-automation/skills/browser-automation/SKILL.md +3 -3
- package/server/dist/builtin-plugins/composer/dist/app.js +4 -4
- package/server/dist/builtin-plugins/concurrency-limit/dist/app.js +1 -1
- package/server/dist/builtin-plugins/concurrency-limit/skills/concurrency-limit/SKILL.md +1 -1
- package/server/dist/builtin-plugins/connect/dist/app.js +2 -2
- package/server/dist/builtin-plugins/connect/skills/share-server-links/SKILL.md +1 -1
- package/server/dist/builtin-plugins/connect-next/dist/app.js +2 -2
- package/server/dist/builtin-plugins/connect-next/dist/server.js +1 -1
- package/server/dist/builtin-plugins/connect-next/skills/connect-next/SKILL.md +1 -1
- package/server/dist/builtin-plugins/custom-instructions/dist/app.js +1 -1
- package/server/dist/builtin-plugins/docs/dist/app.js +3 -3
- package/server/dist/builtin-plugins/docs/skills/docs/SKILL.md +1 -1
- package/server/dist/builtin-plugins/drafts/dist/app.js +1 -1
- package/server/dist/builtin-plugins/environment-git-worktree/dist/app.js +1 -1
- package/server/dist/builtin-plugins/environment-modal-sandbox/dist/app.js +1 -1
- package/server/dist/builtin-plugins/environment-modal-sandbox/dist/server.js +1 -1
- package/server/dist/builtin-plugins/environment-modal-sandbox/skills/modal-sandboxes/SKILL.md +5 -5
- package/server/dist/builtin-plugins/environment-project-checkout/dist/app.js +1 -1
- package/server/dist/builtin-plugins/github/dist/app.js +2 -2
- package/server/dist/builtin-plugins/github/dist/server.js +7 -7
- package/server/dist/builtin-plugins/github/package.json +2 -2
- package/server/dist/builtin-plugins/github/skills/github-change/SKILL.md +2 -2
- package/server/dist/builtin-plugins/github/skills/github-change/references/merging.md +8 -8
- package/server/dist/builtin-plugins/github-pr-status/dist/app.js +6 -6
- package/server/dist/builtin-plugins/inline-vis/dist/app.js +2 -2
- package/server/dist/builtin-plugins/inline-vis/skills/inline-vis/SKILL.md +2 -2
- package/server/dist/builtin-plugins/keep-awake/dist/app.js +1 -1
- package/server/dist/builtin-plugins/keep-awake/dist/server.js +1 -1
- package/server/dist/builtin-plugins/library/dist/app.js +2 -2
- package/server/dist/builtin-plugins/mail/skills/mail/SKILL.md +1 -1
- package/server/dist/builtin-plugins/marketplace.json +10 -10
- package/server/dist/builtin-plugins/mcp/dist/server.js +8 -8
- package/server/dist/builtin-plugins/mcp/skills/mcp/SKILL.md +1 -1
- package/server/dist/builtin-plugins/memory/dist/app.js +1 -1
- package/server/dist/builtin-plugins/memory/dist/server.js +4 -4
- package/server/dist/builtin-plugins/memory/skills/memory/SKILL.md +5 -5
- package/server/dist/builtin-plugins/monaco-editor/dist/app.js +1 -1
- package/server/dist/builtin-plugins/navigation/dist/app.js +1 -1
- package/server/dist/builtin-plugins/notify-feed/dist/app.js +3 -3
- package/server/dist/builtin-plugins/notify-feed/dist/server.js +2 -2
- package/server/dist/builtin-plugins/orbit/dist/app.js +2 -2
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/docs/handoff-to-new-conversation.md +1 -1
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/fixed-runner/linux-x64/manifest.json +4 -4
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/revision +1 -1
- package/server/dist/builtin-plugins/orbit/dist/assets/moonlet/source.json +1 -1
- package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/back/CLAUDE.md +5 -5
- package/server/dist/builtin-plugins/orbit/dist/assets/plugins/moonlet/front/CLAUDE.md +15 -15
- package/server/dist/builtin-plugins/orbit/dist/host.js +49 -49
- package/server/dist/builtin-plugins/orbit/dist/host.meta.json +1 -1
- package/server/dist/builtin-plugins/orbit/dist/server.js +148 -148
- package/server/dist/builtin-plugins/pdf-preview/dist/app.js +1 -1
- package/server/dist/builtin-plugins/plugin-api-docs/dist/app.js +2 -2
- package/server/dist/builtin-plugins/plugin-api-tester/dist/app.js +1 -1
- package/server/dist/builtin-plugins/prompt-library/dist/app.js +2 -2
- package/server/dist/builtin-plugins/prompt-library/skills/prompt-library/SKILL.md +1 -1
- package/server/dist/builtin-plugins/provider-acp/dist/app.js +1 -1
- package/server/dist/builtin-plugins/provider-acp/dist/host.js +5 -5
- package/server/dist/builtin-plugins/provider-acp/dist/host.meta.json +1 -1
- package/server/dist/builtin-plugins/provider-acp/dist/server.js +97 -97
- package/server/dist/builtin-plugins/provider-acp/skills/acp-provider/SKILL.md +9 -9
- package/server/dist/builtin-plugins/provider-claude-code/dist/app.js +1 -1
- package/server/dist/builtin-plugins/provider-claude-code/dist/host.js +3 -3
- package/server/dist/builtin-plugins/provider-claude-code/dist/host.meta.json +1 -1
- package/server/dist/builtin-plugins/provider-claude-code/dist/server.js +1 -1
- package/server/dist/builtin-plugins/provider-codex/dist/app.js +2 -2
- package/server/dist/builtin-plugins/provider-codex/dist/host.js +45 -45
- package/server/dist/builtin-plugins/provider-codex/dist/host.meta.json +1 -1
- package/server/dist/builtin-plugins/provider-codex/dist/server.js +1 -1
- package/server/dist/builtin-plugins/provider-pi/dist/app.js +1 -1
- package/server/dist/builtin-plugins/provider-pi/skills/pi-provider/SKILL.md +1 -1
- package/server/dist/builtin-plugins/provider-retry/dist/app.js +1 -1
- package/server/dist/builtin-plugins/provider-retry/skills/provider-retry/SKILL.md +1 -1
- package/server/dist/builtin-plugins/provider-usage/dist/app.js +12 -12
- package/server/dist/builtin-plugins/push-notifications/dist/app.js +2 -2
- package/server/dist/builtin-plugins/push-notifications/skills/push-notifications/SKILL.md +1 -1
- package/server/dist/builtin-plugins/scheduled-send/dist/app.js +1 -1
- package/server/dist/builtin-plugins/secrets/dist/app.js +1 -1
- package/server/dist/builtin-plugins/side-chat/dist/app.js +1 -1
- package/server/dist/builtin-plugins/storage-retention/dist/app.js +1 -1
- package/server/dist/builtin-plugins/storage-retention/dist/server.js +2 -2
- package/server/dist/builtin-plugins/storage-retention/skills/storage-retention/SKILL.md +5 -5
- package/server/dist/builtin-plugins/tasks/dist/app.js +4 -4
- package/server/dist/builtin-plugins/tasks/skills/tasks/SKILL.md +1 -1
- package/server/dist/builtin-plugins/theme-preview/dist/app.js +2 -2
- package/server/dist/builtin-plugins/theme-preview/skills/bb-theme-authoring/SKILL.md +1 -1
- package/server/dist/builtin-plugins/thread-list/dist/app.js +2 -2
- package/server/dist/builtin-plugins/thread-list/dist/server.js +2 -2
- package/server/dist/builtin-plugins/workflows/dist/app.js +1 -1
- package/server/dist/builtin-plugins/workflows/dist/server.js +4 -4
- package/server/dist/builtin-plugins/workflows/skills/workflows/SKILL.md +4 -4
- package/server/dist/builtin-plugins/workflows/skills/workflows/references/authoring.md +7 -7
- package/server/dist/builtin-skills/bb-cli/SKILL.md +3 -3
- package/server/dist/builtin-skills/bb-plugin-authoring/SKILL.md +4 -4
- package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-cli-agents.md +6 -6
- package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-events.md +2 -2
- package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-foundation.md +1 -1
- package/server/dist/builtin-skills/bb-plugin-authoring/references/backend-sdk.md +1 -1
- package/server/dist/builtin-skills/bb-plugin-authoring/references/distribution.md +2 -2
- package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-components.md +4 -4
- package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-core-slots.md +15 -15
- package/server/dist/builtin-skills/bb-plugin-authoring/references/frontend-hooks-and-ui.md +9 -9
- package/server/dist/builtin-skills/bb-plugin-authoring/references/providers.md +3 -3
- package/server/dist/builtin-skills/bb-plugin-authoring/references/quickstart.md +10 -10
- package/server/dist/builtin-skills/skill-creator/SKILL.md +2 -2
- package/server/dist/builtin-skills/submit-a-plugin/SKILL.md +3 -3
- package/server/dist/builtin-skills/submit-a-plugin/references/marketplace-entry.md +8 -8
- package/server/dist/builtin-skills/submit-a-plugin/references/plugin-release.md +1 -1
- package/server/dist/start-server.js +75 -70
- package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.br +0 -0
- package/app/dist/assets/AddMachineDialog-BHF-GkBG.js.gz +0 -0
- package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.br +0 -0
- package/app/dist/assets/AppFileExternalNavigationDispatcher-BNbJsP1g.js.gz +0 -0
- package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.br +0 -0
- package/app/dist/assets/BrowserTabDeck-BlOoU-vR.js.gz +0 -0
- package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.br +0 -0
- package/app/dist/assets/CommandPaletteBody-CBbTgLrW.js.gz +0 -0
- package/app/dist/assets/DiffHost-DYBSO1_c.js.br +0 -0
- package/app/dist/assets/DiffHost-DYBSO1_c.js.gz +0 -0
- package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.br +0 -0
- package/app/dist/assets/ExperimentalFileLinkMenu-DO2lGQoK.js.gz +0 -0
- package/app/dist/assets/FilePreview-ORcgsTax.js.br +0 -0
- package/app/dist/assets/FilePreview-ORcgsTax.js.gz +0 -0
- package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.br +0 -0
- package/app/dist/assets/GitDiffCardHeader-i4vt7tT5.js.gz +0 -0
- package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.br +0 -0
- package/app/dist/assets/InlineMessageEditorFrame-y089xCLP.js.gz +0 -0
- package/app/dist/assets/MachineLabel-D07WUIMh.js.br +0 -0
- package/app/dist/assets/MachineLabel-D07WUIMh.js.gz +0 -0
- package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.br +0 -0
- package/app/dist/assets/MachineRenameDialog-RyrwvNas.js.gz +0 -0
- package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.br +0 -0
- package/app/dist/assets/MachineSettingsView-Bg6Op62W.js.gz +0 -0
- package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.br +0 -0
- package/app/dist/assets/MicrophonePreferences-DwsTYfON.js.gz +0 -0
- package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.br +0 -0
- package/app/dist/assets/ModelReasoningMenu-Dth3XXm8.js.gz +0 -0
- package/app/dist/assets/MoonletDiff-Da65ABAI.js.br +0 -0
- package/app/dist/assets/MoonletDiff-Da65ABAI.js.gz +0 -0
- package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.br +0 -0
- package/app/dist/assets/MoonletDiffSplit-Phl7m23w.js.gz +0 -0
- package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.br +0 -0
- package/app/dist/assets/MoonletSourceCode-C5aa88dK.js.gz +0 -0
- package/app/dist/assets/NewTabPage-BKkv1maV.js.br +0 -0
- package/app/dist/assets/NewTabPage-BKkv1maV.js.gz +0 -0
- package/app/dist/assets/NewThreadComposer-00DY4i8k.js.br +0 -0
- package/app/dist/assets/NewThreadComposer-00DY4i8k.js.gz +0 -0
- package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.br +0 -0
- package/app/dist/assets/OnboardingFlow-GwpuTTqu.js.gz +0 -0
- package/app/dist/assets/OptionPicker-Cy_W5NWS.js.br +0 -0
- package/app/dist/assets/OptionPicker-Cy_W5NWS.js.gz +0 -0
- package/app/dist/assets/PaletteShell-CRwrb4lb.js.br +0 -0
- package/app/dist/assets/PaletteShell-CRwrb4lb.js.gz +0 -0
- package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.br +0 -0
- package/app/dist/assets/PaneMaximizeButton-CMp4cCoZ.js.gz +0 -0
- package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.br +0 -0
- package/app/dist/assets/PierreLineSelectionActions-BXbCJV8P.js.gz +0 -0
- package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.br +0 -0
- package/app/dist/assets/PluginPanelRightPanelHost-CuKRaAaL.js.gz +0 -0
- package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.br +0 -0
- package/app/dist/assets/PluginSettingsSections-DJo5h7Qh.js.gz +0 -0
- package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.br +0 -0
- package/app/dist/assets/PluginThreadChat-BV6OMCzu.js.gz +0 -0
- package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.br +0 -0
- package/app/dist/assets/ProjectDetailSettingsView-DdF6YsSg.js.gz +0 -0
- package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.br +0 -0
- package/app/dist/assets/ProjectMachineSetupDialog-CtbI4XxM.js.gz +0 -0
- package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.br +0 -0
- package/app/dist/assets/ProjectsSettingsSection-BT1kXbPn.js.gz +0 -0
- package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.br +0 -0
- package/app/dist/assets/QueuedMessagesList-D1aAchqp.js.gz +0 -0
- package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.br +0 -0
- package/app/dist/assets/RemotePathBrowser-vPIL8lVm.js.gz +0 -0
- package/app/dist/assets/RootComposeView-DV6JGFlA.js.br +0 -0
- package/app/dist/assets/RootComposeView-DV6JGFlA.js.gz +0 -0
- package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.br +0 -0
- package/app/dist/assets/SecondaryPanelLayout-BpHDgFJ_.js.gz +0 -0
- package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.br +0 -0
- package/app/dist/assets/ServerMoveOverlayView-CGkGzv8t.js.gz +0 -0
- package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.br +0 -0
- package/app/dist/assets/SettingsSidebar-1XC0Uxwo.js.gz +0 -0
- package/app/dist/assets/SettingsView-BUobmesT.js +0 -7
- package/app/dist/assets/SettingsView-BUobmesT.js.br +0 -0
- package/app/dist/assets/SettingsView-BUobmesT.js.gz +0 -0
- package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.br +0 -0
- package/app/dist/assets/SidebarFooterCustomize-D7sLYPwD.js.gz +0 -0
- package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.br +0 -0
- package/app/dist/assets/SidebarVisibilityCustomize-DpTzFoGl.js.gz +0 -0
- package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.br +0 -0
- package/app/dist/assets/SourceCodeHost-DVEXLJK1.js.gz +0 -0
- package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.br +0 -0
- package/app/dist/assets/SplitWorkspaceRoute-BfxQQdOx.js.gz +0 -0
- package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.br +0 -0
- package/app/dist/assets/TerminalOutputBlock-COQNamKR.js.gz +0 -0
- package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.br +0 -0
- package/app/dist/assets/ThreadActionsMenu-064Gcy7T.js.gz +0 -0
- package/app/dist/assets/ThreadDetailView-CjoXzweq.js.br +0 -0
- package/app/dist/assets/ThreadDetailView-CjoXzweq.js.gz +0 -0
- package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.br +0 -0
- package/app/dist/assets/ThreadSearchPaletteMode-CwdePsHK.js.gz +0 -0
- package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.br +0 -0
- package/app/dist/assets/ThreadSecondaryPanel-CtYtgTla.js.gz +0 -0
- package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.br +0 -0
- package/app/dist/assets/ThreadSecondaryPanelTabContent-BNQi8b2n.js.gz +0 -0
- package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.br +0 -0
- package/app/dist/assets/ThreadStatusGlyph-DxxHDn0P.js.gz +0 -0
- package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.br +0 -0
- package/app/dist/assets/ThreadTerminalPanel-fb5Kk0KG.js.gz +0 -0
- package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.br +0 -0
- package/app/dist/assets/ThreadTerminalView-BiGdt3Fd.js.gz +0 -0
- package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.br +0 -0
- package/app/dist/assets/ThreadTimelineNavigationContext-epkIpS1J.js.gz +0 -0
- package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.br +0 -0
- package/app/dist/assets/TimelineDetailScroll-D8gge5Y9.js.gz +0 -0
- package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.br +0 -0
- package/app/dist/assets/TimelineFileDiffBlock-BJt7kifl.js.gz +0 -0
- package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.br +0 -0
- package/app/dist/assets/TimelineSelectionMenu-DrK39LAT.js.gz +0 -0
- package/app/dist/assets/ToolsView-4tUvUv2U.js.br +0 -0
- package/app/dist/assets/ToolsView-4tUvUv2U.js.gz +0 -0
- package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.br +0 -0
- package/app/dist/assets/ToolsViewSplits-BWOxgNc1.js.gz +0 -0
- package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.br +0 -0
- package/app/dist/assets/WaveformVisualizer-C1SzIkiu.js.gz +0 -0
- package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.br +0 -0
- package/app/dist/assets/app-fixed-tab-navigation-Cv4Tj7xZ.js.gz +0 -0
- package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.br +0 -0
- package/app/dist/assets/audio-input-device-preference-D8tr0bqw.js.gz +0 -0
- package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.br +0 -0
- package/app/dist/assets/bottom-anchored-scroll-body-VYrnz8Hl.js.gz +0 -0
- package/app/dist/assets/browser-url-jhAVtSw2.js.br +0 -0
- package/app/dist/assets/browser-url-jhAVtSw2.js.gz +0 -0
- package/app/dist/assets/checkbox-qaQbU8-H.js.br +0 -0
- package/app/dist/assets/checkbox-qaQbU8-H.js.gz +0 -0
- package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.br +0 -0
- package/app/dist/assets/code-loading-skeletons-pfQDO26Y.js.gz +0 -0
- package/app/dist/assets/detail-card-C3OH86kJ.js.br +0 -0
- package/app/dist/assets/detail-card-C3OH86kJ.js.gz +0 -0
- package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.br +0 -0
- package/app/dist/assets/diff-stats-tally-DkIHmiEl.js.gz +0 -0
- package/app/dist/assets/dist-CWXlD45B.js.br +0 -0
- package/app/dist/assets/dist-CWXlD45B.js.gz +0 -0
- package/app/dist/assets/environment-mutations-BrA6u8Ev.js.br +0 -0
- package/app/dist/assets/environment-mutations-BrA6u8Ev.js.gz +0 -0
- package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.br +0 -0
- package/app/dist/assets/environment-workspace-display-0oqBMXMB.js.gz +0 -0
- package/app/dist/assets/event-code-block-BfPSBXNn.js.br +0 -0
- package/app/dist/assets/event-code-block-BfPSBXNn.js.gz +0 -0
- package/app/dist/assets/expandable-text-01SvfXRm.js.br +0 -0
- package/app/dist/assets/expandable-text-01SvfXRm.js.gz +0 -0
- package/app/dist/assets/file-path-link-Ddg7Fzor.js.br +0 -0
- package/app/dist/assets/file-path-link-Ddg7Fzor.js.gz +0 -0
- package/app/dist/assets/host-mutations-CAtir6jv.js.br +0 -0
- package/app/dist/assets/host-mutations-CAtir6jv.js.gz +0 -0
- package/app/dist/assets/icon-extended-D2fR2GTF.js.br +0 -0
- package/app/dist/assets/icon-extended-D2fR2GTF.js.gz +0 -0
- package/app/dist/assets/image-lightbox-Dhmri6WK.js.br +0 -0
- package/app/dist/assets/image-lightbox-Dhmri6WK.js.gz +0 -0
- package/app/dist/assets/index-5EQKiTkW.css +0 -2
- package/app/dist/assets/index-5EQKiTkW.css.br +0 -0
- package/app/dist/assets/index-5EQKiTkW.css.gz +0 -0
- package/app/dist/assets/index-CfvM6UcU.js.br +0 -0
- package/app/dist/assets/index-CfvM6UcU.js.gz +0 -0
- package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.br +0 -0
- package/app/dist/assets/inline-rename-editor-Bg8SXoZ3.js.gz +0 -0
- package/app/dist/assets/launcherRow-CqPaUYWn.js.br +0 -0
- package/app/dist/assets/launcherRow-CqPaUYWn.js.gz +0 -0
- package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.br +0 -0
- package/app/dist/assets/localhost-link-rewrite-description-DP-bXSL8.js.gz +0 -0
- package/app/dist/assets/markdown-html-BU8qsXmq.js.br +0 -0
- package/app/dist/assets/markdown-html-BU8qsXmq.js.gz +0 -0
- package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.br +0 -0
- package/app/dist/assets/markdown-local-file-link-D-MSnVWD.js.gz +0 -0
- package/app/dist/assets/markdown-preview-BLL1QuNp.js.br +0 -0
- package/app/dist/assets/markdown-preview-BLL1QuNp.js.gz +0 -0
- package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.br +0 -0
- package/app/dist/assets/markdown-prompt-mentions-B5LVmCbO.js.gz +0 -0
- package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.br +0 -0
- package/app/dist/assets/model-load-error-message-Dmp1hUNg.js.gz +0 -0
- package/app/dist/assets/onboarding-telemetry-BSt5c7Sg.js +0 -1
- package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.br +0 -0
- package/app/dist/assets/open-in-editor-button-D0wnpT6x.js.gz +0 -0
- package/app/dist/assets/page-shell-CgSxnF9m.js.br +0 -0
- package/app/dist/assets/page-shell-CgSxnF9m.js.gz +0 -0
- package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.br +0 -0
- package/app/dist/assets/pierre-worker-pool-CHGWu76e.js.gz +0 -0
- package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.br +0 -0
- package/app/dist/assets/plugin-detail-navigation-DuR8_JCx.js.gz +0 -0
- package/app/dist/assets/plugin-frontend-D5ijLuKC.js.br +0 -0
- package/app/dist/assets/plugin-frontend-D5ijLuKC.js.gz +0 -0
- package/app/dist/assets/plugin-ui-Dpa8hcuk.js.br +0 -0
- package/app/dist/assets/plugin-ui-Dpa8hcuk.js.gz +0 -0
- package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.br +0 -0
- package/app/dist/assets/queued-editor-typeahead-layout-Czaq8Cl9.js.gz +0 -0
- package/app/dist/assets/queued-messages-layout-B5xwiued.js.br +0 -0
- package/app/dist/assets/queued-messages-layout-B5xwiued.js.gz +0 -0
- package/app/dist/assets/resource-list-BKpxiO2e.js.br +0 -0
- package/app/dist/assets/resource-list-BKpxiO2e.js.gz +0 -0
- package/app/dist/assets/root-compose-create-preference-BeAvwSHy.js +0 -1
- package/app/dist/assets/settings-nav-C9-jh_HN.js.br +0 -0
- package/app/dist/assets/settings-nav-C9-jh_HN.js.gz +0 -0
- package/app/dist/assets/settings-sections-BMr_XU5l.js.br +0 -0
- package/app/dist/assets/settings-sections-BMr_XU5l.js.gz +0 -0
- package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.br +0 -0
- package/app/dist/assets/sidebarTouchSensor-DG_A1RmT.js.gz +0 -0
- package/app/dist/assets/switch-BjJ8825r.js.br +0 -0
- package/app/dist/assets/switch-BjJ8825r.js.gz +0 -0
- package/app/dist/assets/thread-event-parser-ma5CGP66.js.br +0 -0
- package/app/dist/assets/thread-event-parser-ma5CGP66.js.gz +0 -0
- package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.br +0 -0
- package/app/dist/assets/thread-panel-queries-BXeOzk_6.js.gz +0 -0
- package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.br +0 -0
- package/app/dist/assets/thread-runtime-mutations-DmKkyel0.js.gz +0 -0
- package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.br +0 -0
- package/app/dist/assets/thread-terminal-queries-AFVZ5K6p.js.gz +0 -0
- package/app/dist/assets/threadRecentItems-DXsdcpBk.js.br +0 -0
- package/app/dist/assets/threadRecentItems-DXsdcpBk.js.gz +0 -0
- package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.br +0 -0
- package/app/dist/assets/threadWorkspaceOpenPath-DwKd-s_5.js.gz +0 -0
- package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.br +0 -0
- package/app/dist/assets/title-bar-scroll-fade-Dw_BPLyx.js.gz +0 -0
- package/app/dist/assets/use-hover-popover-DzrAfLzd.js.br +0 -0
- package/app/dist/assets/use-hover-popover-DzrAfLzd.js.gz +0 -0
- package/app/dist/assets/useElementWidth-Kv5FX-9C.js.br +0 -0
- package/app/dist/assets/useElementWidth-Kv5FX-9C.js.gz +0 -0
- package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.br +0 -0
- package/app/dist/assets/useLocalOpenTargets-B7rqz64L.js.gz +0 -0
- package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.br +0 -0
- package/app/dist/assets/usePanelResizeSnap-Dizp45Ab.js.gz +0 -0
- package/app/dist/assets/usePanelTerminals-ByzphxXd.js.br +0 -0
- package/app/dist/assets/usePanelTerminals-ByzphxXd.js.gz +0 -0
- package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.br +0 -0
- package/app/dist/assets/usePathSuggestions-Bd5UhdCh.js.gz +0 -0
- package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.br +0 -0
- package/app/dist/assets/useResolvedLiveFileTarget-x5Gd-Gzx.js.gz +0 -0
- package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.br +0 -0
- package/app/dist/assets/useThreadTerminalController-CUnfO0Da.js.gz +0 -0
- package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.br +0 -0
- package/app/dist/assets/workspace-change-summary-CLNpSq_E.js.gz +0 -0
- package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.br +0 -0
- package/app/dist/assets/workspace-checkout-display-Aad1Wxi4.js.gz +0 -0
- package/host-daemon/dist/moonlet-chunks/chunk-4XWRV5U3.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,jr as n,kr as r,qr as i,ri as a}from"./boot-vendor-CKEhulXz.js";import{Co as o,Dh as s,Do as c,Eo as l,Gd as u,Go as d,La as f,Qi as p,So as m,Zo as h,ea as g,g as _,ia as v,jh as y,ki as b,km as x,wo as S,xm as C}from"./index-CfvM6UcU.js";import{n as w}from"./index.browser-usHDzq3C.js";import{t as T}from"./OptionPicker-Cy_W5NWS.js";import{s as E}from"./dist-CWXlD45B.js";import{n as D,r as O}from"./machine-server-access-Drk0mdHH.js";var k=r(),A=e(t(),1),j=e(a(),1);function M(e){try{return new URL(e)}catch{return null}}function N(){let e=d(),t=_(),n=e.data?.generalSettings,r=e.data?.serverAccess,i=n?.machineServerUrl??``,[a,o]=(0,A.useState)(null),[s,c]=(0,A.useState)(null),l=!n,u=r?.defaultProviderId??`direct`,[f,p]=(0,A.useState)(null);(0,A.useEffect)(()=>{f===u&&p(null)},[u,f]);let m=f??u;return{access:r,disabled:l,draft:a,error:s,effective:r?.providers.find(e=>e.id===m),configurationMessage:D(r,m),saving:t.isPending,selected:m,value:i,editDraft:e=>{o(e),c(null)},selectProvider:e=>{!n||e===m||(p(e),t.mutate({defaultMachineAccess:e},{onError:()=>p(null)}))},commitUrl:async()=>{if(!n||a===null)return;let e=a.trim();if(e){let t=M(e);if(t===null||![`http:`,`https:`].includes(t.protocol)||t.username||t.password){c(`Enter a valid HTTP or HTTPS URL without credentials`);return}if(b(e)){c(`Other machines cannot reach localhost. Use a domain or shared-network address.`);return}}try{await t.mutateAsync({machineServerUrl:e||null})}catch(e){c(h({error:e,fallbackMessage:`Couldn't save the address.`}));return}o(null),c(null)}}}function P(e){let t=(0,k.c)(7),{children:n,title:r}=e,i=r===void 0?`Machine access`:r,a=N(),o;t[0]!==n||t[1]!==a?(o=n?.(a.selected===`direct`?null:a.effective?.pluginId??null),t[0]=n,t[1]=a,t[2]=o):o=t[2];let s;return t[3]!==a||t[4]!==o||t[5]!==i?(s=(0,j.jsx)(F,{machineAccess:a,title:i,children:o}),t[3]=a,t[4]=o,t[5]=i,t[6]=s):s=t[6],s}function F(e){let t=(0,k.c)(12),{machineAccess:n,children:r,title:i}=e,a=i===void 0?`Machine access`:i,o;t[0]===a?o=t[1]:(o=(0,j.jsx)(`h2`,{className:`text-sm font-semibold`,children:a}),t[0]=a,t[1]=o);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,j.jsx)(`p`,{className:`mt-1 text-xs text-subtle-foreground`,children:`Choose how your devices reach this Moonlet server.`}),t[2]=c):c=t[2];let l;t[3]===o?l=t[4]:(l=(0,j.jsxs)(`div`,{children:[o,c]}),t[3]=o,t[4]=l);let u;t[5]!==r||t[6]!==n?(u=(0,j.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,j.jsx)(`div`,{className:`px-4 py-3`,children:n.access===void 0?(0,j.jsxs)(`p`,{role:`status`,className:`flex h-8 items-center gap-2 text-xs text-subtle-foreground`,children:[(0,j.jsx)(s,{name:`Spinner`,className:`size-3.5 animate-spin`}),`Loading connection settings…`]}):(0,j.jsxs)(j.Fragment,{children:[n.selected!==`direct`&&n.effective?(0,j.jsx)(V,{machineAccess:n,methodPicker:(0,j.jsx)(R,{machineAccess:n,align:`start`})}):(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`flex`,children:(0,j.jsx)(R,{machineAccess:n,align:`start`})}),(0,j.jsx)(B,{machineAccess:n})]}),r]})})}),t[5]=r,t[6]=n,t[7]=u):u=t[7];let d;return t[8]!==l||t[9]!==u||t[10]!==a?(d=(0,j.jsxs)(`section`,{"aria-label":a,className:`space-y-3`,children:[l,u]}),t[8]=l,t[9]=u,t[10]=a,t[11]=d):d=t[11],d}function I(e){let t=(0,k.c)(3),{onNavigate:n}=e,r=N(),i;return t[0]!==r||t[1]!==n?(i=(0,j.jsx)(L,{machineAccess:r,onNavigate:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function L(e){let t=(0,k.c)(9),{machineAccess:n,onNavigate:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsx)(`span`,{className:`text-sm font-normal text-foreground`,children:`Connection method`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,(0,j.jsx)(R,{machineAccess:n})]}),t[1]=n,t[2]=a);let o;t[3]!==n||t[4]!==r?(o=(0,j.jsx)(B,{machineAccess:n,onNavigate:r}),t[3]=n,t[4]=r,t[5]=o):o=t[5];let s;return t[6]!==a||t[7]!==o?(s=(0,j.jsxs)(`div`,{className:`space-y-3`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function R(e){let t=(0,k.c)(15),{machineAccess:n,align:r}=e,i=r===void 0?`end`:r,{access:a,disabled:o,selected:s}=n,c;t[0]!==a||t[1]!==n.effective?(c=a&&!n.effective?{label:`Unavailable method`}:void 0,t[0]=a,t[1]=n.effective,t[2]=c):c=t[2];let l=i===`start`?`-ml-1`:void 0,u;t[3]===a?.providers?u=t[4]:(u=a?.providers??[],t[3]=a?.providers,t[4]=u);let d;t[5]===u?d=t[6]:(d=u.map(z),t[5]=u,t[6]=d);let f;return t[7]!==i||t[8]!==o||t[9]!==n.selectProvider||t[10]!==s||t[11]!==c||t[12]!==l||t[13]!==d?(f=(0,j.jsx)(T,{modal:!1,label:`Connection method`,value:s,displayOverride:c,disabled:o,showChevronWhenDisabled:!0,align:i,className:l,options:d,onChange:n.selectProvider}),t[7]=i,t[8]=o,t[9]=n.selectProvider,t[10]=s,t[11]=c,t[12]=l,t[13]=d,t[14]=f):f=t[14],f}function z(e){return{value:e.id,label:e.displayName,description:e.description}}function B(e){let t=(0,k.c)(21),{machineAccess:n,onNavigate:r}=e,{access:i,disabled:a,draft:o,effective:s,error:c,saving:l,selected:u,value:d}=n,f;t[0]!==s||t[1]!==n||t[2]!==r||t[3]!==u?(f=u!==`direct`&&s!==void 0&&(0,j.jsx)(V,{machineAccess:n,onNavigate:r}),t[0]=s,t[1]=n,t[2]=r,t[3]=u,t[4]=f):f=t[4];let p;t[5]!==s||t[6]!==u?(p=u!==`direct`&&s===void 0&&(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`This connection method is not installed. Choose another method above.`}),t[5]=s,t[6]=u,t[7]=p):p=t[7];let m;t[8]!==i?.effectiveUrl||t[9]!==a||t[10]!==o||t[11]!==c||t[12]!==n||t[13]!==l||t[14]!==u||t[15]!==d?(m=u===`direct`&&(0,j.jsxs)(E,{label:`Server address`,description:`Use your own domain or an address on a shared network. Your devices must be able to reach this address; localhost won’t work.`,controlPlacement:`below`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(v,{className:`min-w-0 flex-1 basis-48`,"aria-label":`Server address`,"aria-invalid":c!==null,value:o??d,placeholder:i?.effectiveUrl??`https://moonlet.example.com`,disabled:a,onChange:e=>n.editDraft(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n.commitUrl()}}),(0,j.jsx)(y,{variant:`outline`,className:`h-9 max-md:pointer-coarse:h-10`,disabled:a||o===null||o.trim()===d,onClick:()=>void n.commitUrl(),children:l?`Saving…`:`Save`})]}),c!==null&&(0,j.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-destructive-text`,children:c})]}),t[8]=i?.effectiveUrl,t[9]=a,t[10]=o,t[11]=c,t[12]=n,t[13]=l,t[14]=u,t[15]=d,t[16]=m):m=t[16];let h;return t[17]!==f||t[18]!==p||t[19]!==m?(h=(0,j.jsxs)(j.Fragment,{children:[f,p,m]}),t[17]=f,t[18]=p,t[19]=m,t[20]=h):h=t[20],h}function V(e){let t=(0,k.c)(22),{machineAccess:r,onNavigate:i,methodPicker:a}=e,{effective:o,configurationMessage:c}=r;if(!o)return null;let l=c===null,u=o.availability?.status===`setup-required`&&o.pluginId!==null,d=u?`flex flex-col items-start gap-2`:`flex min-h-7 items-center justify-between gap-3`,f;t[0]!==c||t[1]!==o.description||t[2]!==u?(f=u&&(0,j.jsxs)(`p`,{className:`max-w-xl text-xs text-subtle-foreground`,children:[o.description,` `,c]}),t[0]=c,t[1]=o.description,t[2]=u,t[3]=f):f=t[3];let p;t[4]!==o.displayName||t[5]!==o.pluginId||t[6]!==i||t[7]!==u?(p=o.pluginId!==null&&(0,j.jsx)(y,{variant:u?`default`:`link`,size:`sm`,className:u?`shrink-0`:`h-7 shrink-0 px-3 font-normal text-subtle-foreground/75 no-underline hover:text-subtle-foreground hover:no-underline`,asChild:!0,children:(0,j.jsx)(n,{onClick:i,to:C({pluginId:o.pluginId}),children:u?(0,j.jsxs)(j.Fragment,{children:[`Set up `,o.displayName,(0,j.jsx)(s,{name:`ArrowRight`})]}):`Manage`})}),t[4]=o.displayName,t[5]=o.pluginId,t[6]=i,t[7]=u,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==d||t[11]!==f||t[12]!==p?(m=(0,j.jsxs)(`div`,{className:d,children:[a,f,p]}),t[9]=a,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13];let h;t[14]!==c||t[15]!==o.availability||t[16]!==l||t[17]!==u?(h=!u&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs`,children:[(0,j.jsxs)(`p`,{className:`inline-flex shrink-0 items-center gap-1.5 font-medium`,children:[l?(0,j.jsx)(`span`,{className:`size-1.5 shrink-0 rounded-full bg-success`,"aria-hidden":`true`}):null,l?`Ready`:`Unavailable`]}),(0,j.jsx)(`p`,{className:`min-w-0 break-words text-subtle-foreground [overflow-wrap:anywhere]`,children:c??(o.availability?.status===`available`?o.availability.serverUrl:null)??`Ready to connect devices.`})]}),t[14]=c,t[15]=o.availability,t[16]=l,t[17]=u,t[18]=h):h=t[18];let g;return t[19]!==m||t[20]!==h?(g=(0,j.jsxs)(`div`,{className:`space-y-0`,children:[m,h]}),t[19]=m,t[20]=h,t[21]=g):g=t[21],g}var H=`manual`;function U(e){let t=(0,k.c)(12),{open:n,onOpenChange:r}=e,i=p(),a;t[0]!==i||t[1]!==r?(a=e=>{e||i.refetch(),r(e)},t[0]=i,t[1]=r,t[2]=a):a=t[2];let s=a,c;t[3]!==s||t[4]!==n?(c=n&&(0,j.jsx)(W,{onOpenChange:s}),t[3]=s,t[4]=n,t[5]=c):c=t[5];let l;t[6]===c?l=t[7]:(l=(0,j.jsx)(o,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,children:c}),t[6]=c,t[7]=l);let u;return t[8]!==s||t[9]!==n||t[10]!==l?(u=(0,j.jsx)(m,{open:n,onOpenChange:s,modal:!1,children:l}),t[8]=s,t[9]=n,t[10]=l,t[11]=u):u=t[11],u}function W(e){let t=(0,k.c)(13),{onOpenChange:n}=e,r=d(),i=p();if(!O(r.data?.serverAccess)){let e;t[0]===r?e=t[1]:(e=r.isPending?{status:`checking`}:r.isError?{status:`failed`,onRetry:()=>void r.refetch()}:{status:`blocked`},t[0]=r,t[1]=e);let i;t[2]===n?i=t[3]:(i=(0,j.jsx)(I,{onNavigate:()=>n(!1)}),t[2]=n,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,j.jsx)(K,{state:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}let a=r.data?.primaryHostId??null,o;t[7]!==i.data||t[8]!==a?(o=i.data?.find(e=>e.id===a)?.name??null,t[7]=i.data,t[8]=a,t[9]=o):o=t[9];let s=o,c;return t[10]!==n||t[11]!==s?(c=(0,j.jsx)(q,{serverMachineName:s,onOpenChange:n}),t[10]=n,t[11]=s,t[12]=c):c=t[12],c}function G(e){return e===null?`The new machine will connect to your Moonlet server. Keep the server machine on so the new machine can keep working.`:`The new machine will connect to the Moonlet server on ${e}. Keep that computer on so the new machine can keep working.`}function K(e){let t=(0,k.c)(7),{state:n,children:r}=e;if(n.status===`checking`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c,{className:`sr-only`,children:`Add a machine`}),(0,j.jsx)(`p`,{role:`status`,className:`text-sm text-subtle-foreground`,children:`Checking machine access…`})]}),t[0]=e):e=t[0],e}if(n.status===`failed`){let e;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{children:`Add a machine`}),(0,j.jsx)(S,{className:`text-destructive-text`,children:`Couldn’t check whether machines can reach this server.`})]}),t[1]=e):e=t[1];let r;return t[2]===n.onRetry?r=t[3]:(r=(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:n.onRetry,children:`Try again`})})]}),t[2]=n.onRetry,t[3]=r),r}let i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{children:`Set up machine access`}),(0,j.jsx)(S,{children:`A new machine has to reach this server over the network. Choose the address it should use.`})]}),t[4]=i):i=t[4];let a;return t[5]===r?a=t[6]:(a=(0,j.jsxs)(j.Fragment,{children:[i,r]}),t[5]=r,t[6]=a),a}function q({serverMachineName:e,onOpenChange:t}){let n=(0,A.useRef)(null),r=(0,A.useRef)(null),a=(0,A.useRef)(new Set),o=(0,A.useRef)(0),[s,c]=(0,A.useState)(null),[l,d]=(0,A.useState)(null);(0,A.useEffect)(()=>()=>{o.current+=1,n.current?.abort(),r.current=null;for(let e of a.current)u.hosts.delete({hostId:e}).catch(()=>void 0);a.current.clear()},[]);let f=i({meta:{showErrorToast:!1},mutationFn:async e=>{let t=o.current;if(e.replaceLaunch){n.current?.abort(),n.current=null;let e=[...a.current];a.current.clear(),await Promise.all(e.map(e=>u.hosts.delete({hostId:e}))),r.current=null}c(null);let i=new AbortController;n.current=i,r.current??=w();try{let e=await u.hosts.experimental_create({key:r.current,machineProviderId:H,inputs:null,wait:!1,signal:i.signal});if(a.current.add(e.id),t!==o.current)throw a.current.delete(e.id),await u.hosts.delete({hostId:e.id}),Error(`Machine setup closed`);let n=null;for(;e.lifecycle.phase===`creating`;){i.signal.throwIfAborted();let t=await u.hosts.experimental_getEnrollmentCommand({hostId:e.id,signal:i.signal});if(t!==null)n=t,c({value:t.command,windowsValue:t.windowsCommand,expiresAt:t.expiresAt,unavailable:!1});else if(n!==null){let e=n;c(t=>t?.unavailable?t:{value:e.command,windowsValue:e.windowsCommand,expiresAt:e.expiresAt,unavailable:!0})}await new Promise(e=>setTimeout(e,1e3)),i.signal.throwIfAborted(),e=await u.hosts.get({hostId:e.id,signal:i.signal})}if(r.current=null,a.current.delete(e.id),e.lifecycle.phase!==`active`)throw Error(e.lifecycle.message??`Machine setup cancelled`);return e}finally{n.current===i&&(n.current=null)}},onSuccess:e=>{r.current=null,d(e)}}),p=f.mutate;return(0,A.useEffect)(()=>{p({replaceLaunch:!1})},[p]),(0,j.jsx)(J,{command:s,connectedHost:l,serverMachineName:e,errorMessage:f.isError?h({error:f.error,fallbackMessage:`Couldn't prepare an enrollment command.`}):null,onRetry:()=>f.mutate({replaceLaunch:!1}),onRegenerate:()=>f.mutate({replaceLaunch:!0}),onOpenMachine:()=>t(!1)})}function J(e){let t=(0,k.c)(24),{command:r,connectedHost:i,serverMachineName:a,errorMessage:o,onRetry:u,onRegenerate:d,onOpenMachine:f}=e,p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,j.jsx)(c,{children:`Add a machine`}),t[0]=p):p=t[0];let m=o===null?void 0:`text-destructive-text`,h=o??`Run this command on the machine you want to add. It installs Moonlet and keeps the machine connected to this server.`,_;t[1]!==m||t[2]!==h?(_=(0,j.jsxs)(l,{children:[p,(0,j.jsx)(S,{className:m,children:h})]}),t[1]=m,t[2]=h,t[3]=_):_=t[3];let v;t[4]!==o||t[5]!==u?(v=o===null?null:(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:u,children:`Try again`})}),t[4]=o,t[5]=u,t[6]=v):v=t[6];let b;t[7]!==r||t[8]!==d?(b=r===null?null:(0,j.jsx)(Z,{command:r.value,windowsCommand:r.windowsValue,expiresAt:r.expiresAt,unavailable:r.unavailable,onRegenerate:d},r.value),t[7]=r,t[8]=d,t[9]=b):b=t[9];let C;t[10]!==r||t[11]!==i||t[12]!==o||t[13]!==f?(C=o===null?(0,j.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:i===null?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,j.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:r===null?`Preparing an enrollment command…`:`Waiting for the machine to connect…`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{connected:!0}),(0,j.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[i.name,` connected`]}),(0,j.jsx)(y,{asChild:!0,size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,children:(0,j.jsxs)(n,{to:x(i.id),onClick:f,children:[`Open machine`,(0,j.jsx)(s,{name:`ArrowRight`})]})})]})}):null,t[10]=r,t[11]=i,t[12]=o,t[13]=f,t[14]=C):C=t[14];let w;t[15]!==o||t[16]!==a?(w=o===null?(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:G(a)}):null,t[15]=o,t[16]=a,t[17]=w):w=t[17];let T;return t[18]!==_||t[19]!==v||t[20]!==b||t[21]!==C||t[22]!==w?(T=(0,j.jsxs)(j.Fragment,{children:[_,v,b,C,w]}),t[18]=_,t[19]=v,t[20]=b,t[21]=C,t[22]=w,t[23]=T):T=t[23],T}function Y(e){let t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}var X=[{id:`posix`,label:`macOS or Linux`},{id:`windows`,label:`Windows`}];function Z(e){let t=(0,k.c)(34),{command:n,windowsCommand:r,expiresAt:i,unavailable:a,onRegenerate:o}=e,s=a===void 0?!1:a,[c,l]=(0,A.useState)(`posix`),u=c===`windows`?r:n,d;t[0]===u?d=t[1]:(d={text:u},t[0]=u,t[1]=d);let{copied:p,copy:m}=f(d),h;t[2]===i?h=t[3]:(h=()=>i-Date.now(),t[2]=i,t[3]=h);let[g,_]=(0,A.useState)(h),v,b;t[4]===i?(v=t[5],b=t[6]):(v=()=>{let e=setInterval(()=>_(i-Date.now()),1e3);return()=>clearInterval(e)},b=[i],t[4]=i,t[5]=v,t[6]=b),(0,A.useEffect)(v,b);let x=g<=0,S;t[7]===c?S=t[8]:(S=X.map(e=>(0,j.jsx)(y,{type:`button`,size:`sm`,variant:c===e.id?`secondary`:`ghost`,"aria-pressed":c===e.id,className:`h-6 px-2 text-xs`,onClick:()=>l(e.id),children:e.label},e.id)),t[7]=c,t[8]=S);let C;t[9]===c?C=t[10]:(C=c===`windows`?(0,j.jsx)(`span`,{className:`ml-auto text-xs text-subtle-foreground`,children:`Run in PowerShell`}):null,t[9]=c,t[10]=C);let w;t[11]!==S||t[12]!==C?(w=(0,j.jsxs)(`div`,{role:`group`,"aria-label":`Machine operating system`,className:`flex items-center gap-1 border-b border-border px-2 py-1.5`,children:[S,C]}),t[11]=S,t[12]=C,t[13]=w):w=t[13];let T;t[14]===u?T=t[15]:(T=(0,j.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-all p-3 font-mono text-xs text-foreground`,children:u}),t[14]=u,t[15]=T);let E;t[16]!==x||t[17]!==o||t[18]!==g||t[19]!==s?(E=s?(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command used`}):x?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command expired`}),(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`ghost`,className:`h-7 px-2 text-xs`,onClick:o,children:`Generate a new command`})]}):(0,j.jsxs)(`span`,{role:`status`,className:`text-xs tabular-nums text-subtle-foreground`,children:[`Command expires in `,Y(g)]}),t[16]=x,t[17]=o,t[18]=g,t[19]=s,t[20]=E):E=t[20];let D=x||s,O;t[21]===m?O=t[22]:(O=()=>void m(),t[21]=m,t[22]=O);let M=p?`Copied`:`Copy`,N;t[23]!==D||t[24]!==O||t[25]!==M?(N=(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`outline`,className:`ml-auto h-7 px-2.5 text-xs`,disabled:D,onClick:O,children:M}),t[23]=D,t[24]=O,t[25]=M,t[26]=N):N=t[26];let P;t[27]!==E||t[28]!==N?(P=(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-border px-3 py-2`,children:[E,N]}),t[27]=E,t[28]=N,t[29]=P):P=t[29];let F;return t[30]!==P||t[31]!==w||t[32]!==T?(F=(0,j.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-border bg-muted/30`,children:[w,T,P]}),t[30]=P,t[31]=w,t[32]=T,t[33]=F):F=t[33],F}export{Z as n,P as r,U as t};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,jr as n,kr as r,qr as i,ri as a}from"./boot-vendor-CKEhulXz.js";import{Co as o,Dh as s,Do as c,Eo as l,Gd as u,Go as d,La as f,Qi as p,So as m,Zo as h,ea as g,g as _,ia as v,jh as y,ki as b,km as x,wo as S,xm as C}from"./index-DCps_qBD.js";import{n as w}from"./index.browser-usHDzq3C.js";import{t as T}from"./OptionPicker-CxOGHDd8.js";import{s as E}from"./dist-DCULoGTS.js";import{n as D,r as O}from"./machine-server-access-CGfd5e1r.js";var k=r(),A=e(t(),1),j=e(a(),1);function M(e){try{return new URL(e)}catch{return null}}function N(){let e=d(),t=_(),n=e.data?.generalSettings,r=e.data?.serverAccess,i=n?.machineServerUrl??``,[a,o]=(0,A.useState)(null),[s,c]=(0,A.useState)(null),l=!n,u=r?.defaultProviderId??`direct`,[f,p]=(0,A.useState)(null);(0,A.useEffect)(()=>{f===u&&p(null)},[u,f]);let m=f??u;return{access:r,disabled:l,draft:a,error:s,effective:r?.providers.find(e=>e.id===m),configurationMessage:D(r,m),saving:t.isPending,selected:m,value:i,editDraft:e=>{o(e),c(null)},selectProvider:e=>{!n||e===m||(p(e),t.mutate({defaultMachineAccess:e},{onError:()=>p(null)}))},commitUrl:async()=>{if(!n||a===null)return;let e=a.trim();if(e){let t=M(e);if(t===null||![`http:`,`https:`].includes(t.protocol)||t.username||t.password){c(`Enter a valid HTTP or HTTPS URL without credentials`);return}if(b(e)){c(`Other machines cannot reach localhost. Use a domain or shared-network address.`);return}}try{await t.mutateAsync({machineServerUrl:e||null})}catch(e){c(h({error:e,fallbackMessage:`Couldn't save the address.`}));return}o(null),c(null)}}}function P(e){let t=(0,k.c)(7),{children:n,title:r}=e,i=r===void 0?`Machine access`:r,a=N(),o;t[0]!==n||t[1]!==a?(o=n?.(a.selected===`direct`?null:a.effective?.pluginId??null),t[0]=n,t[1]=a,t[2]=o):o=t[2];let s;return t[3]!==a||t[4]!==o||t[5]!==i?(s=(0,j.jsx)(F,{machineAccess:a,title:i,children:o}),t[3]=a,t[4]=o,t[5]=i,t[6]=s):s=t[6],s}function F(e){let t=(0,k.c)(12),{machineAccess:n,children:r,title:i}=e,a=i===void 0?`Machine access`:i,o;t[0]===a?o=t[1]:(o=(0,j.jsx)(`h2`,{className:`text-sm font-semibold`,children:a}),t[0]=a,t[1]=o);let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,j.jsx)(`p`,{className:`mt-1 text-xs text-subtle-foreground`,children:`Choose how your devices reach this Moonlet server.`}),t[2]=c):c=t[2];let l;t[3]===o?l=t[4]:(l=(0,j.jsxs)(`div`,{children:[o,c]}),t[3]=o,t[4]=l);let u;t[5]!==r||t[6]!==n?(u=(0,j.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-border bg-card`,children:(0,j.jsx)(`div`,{className:`px-4 py-3`,children:n.access===void 0?(0,j.jsxs)(`p`,{role:`status`,className:`flex h-8 items-center gap-2 text-xs text-subtle-foreground`,children:[(0,j.jsx)(s,{name:`Spinner`,className:`size-3.5 animate-spin`}),`Loading connection settings…`]}):(0,j.jsxs)(j.Fragment,{children:[n.selected!==`direct`&&n.effective?(0,j.jsx)(V,{machineAccess:n,methodPicker:(0,j.jsx)(R,{machineAccess:n,align:`start`})}):(0,j.jsxs)(`div`,{className:`space-y-3`,children:[(0,j.jsx)(`div`,{className:`flex`,children:(0,j.jsx)(R,{machineAccess:n,align:`start`})}),(0,j.jsx)(B,{machineAccess:n})]}),r]})})}),t[5]=r,t[6]=n,t[7]=u):u=t[7];let d;return t[8]!==l||t[9]!==u||t[10]!==a?(d=(0,j.jsxs)(`section`,{"aria-label":a,className:`space-y-3`,children:[l,u]}),t[8]=l,t[9]=u,t[10]=a,t[11]=d):d=t[11],d}function I(e){let t=(0,k.c)(3),{onNavigate:n}=e,r=N(),i;return t[0]!==r||t[1]!==n?(i=(0,j.jsx)(L,{machineAccess:r,onNavigate:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function L(e){let t=(0,k.c)(9),{machineAccess:n,onNavigate:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsx)(`span`,{className:`text-sm font-normal text-foreground`,children:`Connection method`}),t[0]=i):i=t[0];let a;t[1]===n?a=t[2]:(a=(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[i,(0,j.jsx)(R,{machineAccess:n})]}),t[1]=n,t[2]=a);let o;t[3]!==n||t[4]!==r?(o=(0,j.jsx)(B,{machineAccess:n,onNavigate:r}),t[3]=n,t[4]=r,t[5]=o):o=t[5];let s;return t[6]!==a||t[7]!==o?(s=(0,j.jsxs)(`div`,{className:`space-y-3`,children:[a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function R(e){let t=(0,k.c)(15),{machineAccess:n,align:r}=e,i=r===void 0?`end`:r,{access:a,disabled:o,selected:s}=n,c;t[0]!==a||t[1]!==n.effective?(c=a&&!n.effective?{label:`Unavailable method`}:void 0,t[0]=a,t[1]=n.effective,t[2]=c):c=t[2];let l=i===`start`?`-ml-1`:void 0,u;t[3]===a?.providers?u=t[4]:(u=a?.providers??[],t[3]=a?.providers,t[4]=u);let d;t[5]===u?d=t[6]:(d=u.map(z),t[5]=u,t[6]=d);let f;return t[7]!==i||t[8]!==o||t[9]!==n.selectProvider||t[10]!==s||t[11]!==c||t[12]!==l||t[13]!==d?(f=(0,j.jsx)(T,{modal:!1,label:`Connection method`,value:s,displayOverride:c,disabled:o,showChevronWhenDisabled:!0,align:i,className:l,options:d,onChange:n.selectProvider}),t[7]=i,t[8]=o,t[9]=n.selectProvider,t[10]=s,t[11]=c,t[12]=l,t[13]=d,t[14]=f):f=t[14],f}function z(e){return{value:e.id,label:e.displayName,description:e.description}}function B(e){let t=(0,k.c)(21),{machineAccess:n,onNavigate:r}=e,{access:i,disabled:a,draft:o,effective:s,error:c,saving:l,selected:u,value:d}=n,f;t[0]!==s||t[1]!==n||t[2]!==r||t[3]!==u?(f=u!==`direct`&&s!==void 0&&(0,j.jsx)(V,{machineAccess:n,onNavigate:r}),t[0]=s,t[1]=n,t[2]=r,t[3]=u,t[4]=f):f=t[4];let p;t[5]!==s||t[6]!==u?(p=u!==`direct`&&s===void 0&&(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:`This connection method is not installed. Choose another method above.`}),t[5]=s,t[6]=u,t[7]=p):p=t[7];let m;t[8]!==i?.effectiveUrl||t[9]!==a||t[10]!==o||t[11]!==c||t[12]!==n||t[13]!==l||t[14]!==u||t[15]!==d?(m=u===`direct`&&(0,j.jsxs)(E,{label:`Server address`,description:`Use your own domain or an address on a shared network. Your devices must be able to reach this address; localhost won’t work.`,controlPlacement:`below`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(v,{className:`min-w-0 flex-1 basis-48`,"aria-label":`Server address`,"aria-invalid":c!==null,value:o??d,placeholder:i?.effectiveUrl??`https://moonlet.example.com`,disabled:a,onChange:e=>n.editDraft(e.target.value),onKeyDown:e=>{e.key===`Enter`&&n.commitUrl()}}),(0,j.jsx)(y,{variant:`outline`,className:`h-9 max-md:pointer-coarse:h-10`,disabled:a||o===null||o.trim()===d,onClick:()=>void n.commitUrl(),children:l?`Saving…`:`Save`})]}),c!==null&&(0,j.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-destructive-text`,children:c})]}),t[8]=i?.effectiveUrl,t[9]=a,t[10]=o,t[11]=c,t[12]=n,t[13]=l,t[14]=u,t[15]=d,t[16]=m):m=t[16];let h;return t[17]!==f||t[18]!==p||t[19]!==m?(h=(0,j.jsxs)(j.Fragment,{children:[f,p,m]}),t[17]=f,t[18]=p,t[19]=m,t[20]=h):h=t[20],h}function V(e){let t=(0,k.c)(22),{machineAccess:r,onNavigate:i,methodPicker:a}=e,{effective:o,configurationMessage:c}=r;if(!o)return null;let l=c===null,u=o.availability?.status===`setup-required`&&o.pluginId!==null,d=u?`flex flex-col items-start gap-2`:`flex min-h-7 items-center justify-between gap-3`,f;t[0]!==c||t[1]!==o.description||t[2]!==u?(f=u&&(0,j.jsxs)(`p`,{className:`max-w-xl text-xs text-subtle-foreground`,children:[o.description,` `,c]}),t[0]=c,t[1]=o.description,t[2]=u,t[3]=f):f=t[3];let p;t[4]!==o.displayName||t[5]!==o.pluginId||t[6]!==i||t[7]!==u?(p=o.pluginId!==null&&(0,j.jsx)(y,{variant:u?`default`:`link`,size:`sm`,className:u?`shrink-0`:`h-7 shrink-0 px-3 font-normal text-subtle-foreground/75 no-underline hover:text-subtle-foreground hover:no-underline`,asChild:!0,children:(0,j.jsx)(n,{onClick:i,to:C({pluginId:o.pluginId}),children:u?(0,j.jsxs)(j.Fragment,{children:[`Set up `,o.displayName,(0,j.jsx)(s,{name:`ArrowRight`})]}):`Manage`})}),t[4]=o.displayName,t[5]=o.pluginId,t[6]=i,t[7]=u,t[8]=p):p=t[8];let m;t[9]!==a||t[10]!==d||t[11]!==f||t[12]!==p?(m=(0,j.jsxs)(`div`,{className:d,children:[a,f,p]}),t[9]=a,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13];let h;t[14]!==c||t[15]!==o.availability||t[16]!==l||t[17]!==u?(h=!u&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs`,children:[(0,j.jsxs)(`p`,{className:`inline-flex shrink-0 items-center gap-1.5 font-medium`,children:[l?(0,j.jsx)(`span`,{className:`size-1.5 shrink-0 rounded-full bg-success`,"aria-hidden":`true`}):null,l?`Ready`:`Unavailable`]}),(0,j.jsx)(`p`,{className:`min-w-0 break-words text-subtle-foreground [overflow-wrap:anywhere]`,children:c??(o.availability?.status===`available`?o.availability.serverUrl:null)??`Ready to connect devices.`})]}),t[14]=c,t[15]=o.availability,t[16]=l,t[17]=u,t[18]=h):h=t[18];let g;return t[19]!==m||t[20]!==h?(g=(0,j.jsxs)(`div`,{className:`space-y-0`,children:[m,h]}),t[19]=m,t[20]=h,t[21]=g):g=t[21],g}var H=`manual`;function U(e){let t=(0,k.c)(12),{open:n,onOpenChange:r}=e,i=p(),a;t[0]!==i||t[1]!==r?(a=e=>{e||i.refetch(),r(e)},t[0]=i,t[1]=r,t[2]=a):a=t[2];let s=a,c;t[3]!==s||t[4]!==n?(c=n&&(0,j.jsx)(W,{onOpenChange:s}),t[3]=s,t[4]=n,t[5]=c):c=t[5];let l;t[6]===c?l=t[7]:(l=(0,j.jsx)(o,{className:`max-h-[calc(100dvh-2rem)] overflow-y-auto`,children:c}),t[6]=c,t[7]=l);let u;return t[8]!==s||t[9]!==n||t[10]!==l?(u=(0,j.jsx)(m,{open:n,onOpenChange:s,modal:!1,children:l}),t[8]=s,t[9]=n,t[10]=l,t[11]=u):u=t[11],u}function W(e){let t=(0,k.c)(13),{onOpenChange:n}=e,r=d(),i=p();if(!O(r.data?.serverAccess)){let e;t[0]===r?e=t[1]:(e=r.isPending?{status:`checking`}:r.isError?{status:`failed`,onRetry:()=>void r.refetch()}:{status:`blocked`},t[0]=r,t[1]=e);let i;t[2]===n?i=t[3]:(i=(0,j.jsx)(I,{onNavigate:()=>n(!1)}),t[2]=n,t[3]=i);let a;return t[4]!==e||t[5]!==i?(a=(0,j.jsx)(K,{state:e,children:i}),t[4]=e,t[5]=i,t[6]=a):a=t[6],a}let a=r.data?.primaryHostId??null,o;t[7]!==i.data||t[8]!==a?(o=i.data?.find(e=>e.id===a)?.name??null,t[7]=i.data,t[8]=a,t[9]=o):o=t[9];let s=o,c;return t[10]!==n||t[11]!==s?(c=(0,j.jsx)(q,{serverMachineName:s,onOpenChange:n}),t[10]=n,t[11]=s,t[12]=c):c=t[12],c}function G(e){return e===null?`The new machine will connect to your Moonlet server. Keep the server machine on so the new machine can keep working.`:`The new machine will connect to the Moonlet server on ${e}. Keep that computer on so the new machine can keep working.`}function K(e){let t=(0,k.c)(7),{state:n,children:r}=e;if(n.status===`checking`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(c,{className:`sr-only`,children:`Add a machine`}),(0,j.jsx)(`p`,{role:`status`,className:`text-sm text-subtle-foreground`,children:`Checking machine access…`})]}),t[0]=e):e=t[0],e}if(n.status===`failed`){let e;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{children:`Add a machine`}),(0,j.jsx)(S,{className:`text-destructive-text`,children:`Couldn’t check whether machines can reach this server.`})]}),t[1]=e):e=t[1];let r;return t[2]===n.onRetry?r=t[3]:(r=(0,j.jsxs)(j.Fragment,{children:[e,(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:n.onRetry,children:`Try again`})})]}),t[2]=n.onRetry,t[3]=r),r}let i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,j.jsxs)(l,{children:[(0,j.jsx)(c,{children:`Set up machine access`}),(0,j.jsx)(S,{children:`A new machine has to reach this server over the network. Choose the address it should use.`})]}),t[4]=i):i=t[4];let a;return t[5]===r?a=t[6]:(a=(0,j.jsxs)(j.Fragment,{children:[i,r]}),t[5]=r,t[6]=a),a}function q({serverMachineName:e,onOpenChange:t}){let n=(0,A.useRef)(null),r=(0,A.useRef)(null),a=(0,A.useRef)(new Set),o=(0,A.useRef)(0),[s,c]=(0,A.useState)(null),[l,d]=(0,A.useState)(null);(0,A.useEffect)(()=>()=>{o.current+=1,n.current?.abort(),r.current=null;for(let e of a.current)u.hosts.delete({hostId:e}).catch(()=>void 0);a.current.clear()},[]);let f=i({meta:{showErrorToast:!1},mutationFn:async e=>{let t=o.current;if(e.replaceLaunch){n.current?.abort(),n.current=null;let e=[...a.current];a.current.clear(),await Promise.all(e.map(e=>u.hosts.delete({hostId:e}))),r.current=null}c(null);let i=new AbortController;n.current=i,r.current??=w();try{let e=await u.hosts.experimental_create({key:r.current,machineProviderId:H,inputs:null,wait:!1,signal:i.signal});if(a.current.add(e.id),t!==o.current)throw a.current.delete(e.id),await u.hosts.delete({hostId:e.id}),Error(`Machine setup closed`);let n=null;for(;e.lifecycle.phase===`creating`;){i.signal.throwIfAborted();let t=await u.hosts.experimental_getEnrollmentCommand({hostId:e.id,signal:i.signal});if(t!==null)n=t,c({value:t.command,windowsValue:t.windowsCommand,expiresAt:t.expiresAt,unavailable:!1});else if(n!==null){let e=n;c(t=>t?.unavailable?t:{value:e.command,windowsValue:e.windowsCommand,expiresAt:e.expiresAt,unavailable:!0})}await new Promise(e=>setTimeout(e,1e3)),i.signal.throwIfAborted(),e=await u.hosts.get({hostId:e.id,signal:i.signal})}if(r.current=null,a.current.delete(e.id),e.lifecycle.phase!==`active`)throw Error(e.lifecycle.message??`Machine setup cancelled`);return e}finally{n.current===i&&(n.current=null)}},onSuccess:e=>{r.current=null,d(e)}}),p=f.mutate;return(0,A.useEffect)(()=>{p({replaceLaunch:!1})},[p]),(0,j.jsx)(J,{command:s,connectedHost:l,serverMachineName:e,errorMessage:f.isError?h({error:f.error,fallbackMessage:`Couldn't prepare an enrollment command.`}):null,onRetry:()=>f.mutate({replaceLaunch:!1}),onRegenerate:()=>f.mutate({replaceLaunch:!0}),onOpenMachine:()=>t(!1)})}function J(e){let t=(0,k.c)(24),{command:r,connectedHost:i,serverMachineName:a,errorMessage:o,onRetry:u,onRegenerate:d,onOpenMachine:f}=e,p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,j.jsx)(c,{children:`Add a machine`}),t[0]=p):p=t[0];let m=o===null?void 0:`text-destructive-text`,h=o??`Run this command on the machine you want to add. It installs Moonlet and keeps the machine connected to this server.`,_;t[1]!==m||t[2]!==h?(_=(0,j.jsxs)(l,{children:[p,(0,j.jsx)(S,{className:m,children:h})]}),t[1]=m,t[2]=h,t[3]=_):_=t[3];let v;t[4]!==o||t[5]!==u?(v=o===null?null:(0,j.jsx)(`div`,{className:`flex justify-end`,children:(0,j.jsx)(y,{variant:`outline`,size:`sm`,onClick:u,children:`Try again`})}),t[4]=o,t[5]=u,t[6]=v):v=t[6];let b;t[7]!==r||t[8]!==d?(b=r===null?null:(0,j.jsx)(Z,{command:r.value,windowsCommand:r.windowsValue,expiresAt:r.expiresAt,unavailable:r.unavailable,onRegenerate:d},r.value),t[7]=r,t[8]=d,t[9]=b):b=t[9];let C;t[10]!==r||t[11]!==i||t[12]!==o||t[13]!==f?(C=o===null?(0,j.jsx)(`div`,{className:`flex items-center gap-2.5 rounded-md bg-muted/40 px-3 py-2.5`,children:i===null?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(s,{name:`Spinner`,className:`size-4 shrink-0 animate-spin text-muted-foreground`}),(0,j.jsx)(`span`,{role:`status`,className:`text-sm text-muted-foreground`,children:r===null?`Preparing an enrollment command…`:`Waiting for the machine to connect…`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(g,{connected:!0}),(0,j.jsxs)(`span`,{role:`status`,className:`min-w-0 flex-1 truncate text-sm text-foreground`,children:[i.name,` connected`]}),(0,j.jsx)(y,{asChild:!0,size:`sm`,variant:`ghost`,className:`h-7 shrink-0 px-2 text-xs`,children:(0,j.jsxs)(n,{to:x(i.id),onClick:f,children:[`Open machine`,(0,j.jsx)(s,{name:`ArrowRight`})]})})]})}):null,t[10]=r,t[11]=i,t[12]=o,t[13]=f,t[14]=C):C=t[14];let w;t[15]!==o||t[16]!==a?(w=o===null?(0,j.jsx)(`p`,{className:`text-xs text-subtle-foreground`,children:G(a)}):null,t[15]=o,t[16]=a,t[17]=w):w=t[17];let T;return t[18]!==_||t[19]!==v||t[20]!==b||t[21]!==C||t[22]!==w?(T=(0,j.jsxs)(j.Fragment,{children:[_,v,b,C,w]}),t[18]=_,t[19]=v,t[20]=b,t[21]=C,t[22]=w,t[23]=T):T=t[23],T}function Y(e){let t=Math.max(0,Math.floor(e/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,`0`)}`}var X=[{id:`posix`,label:`macOS or Linux`},{id:`windows`,label:`Windows`}];function Z(e){let t=(0,k.c)(34),{command:n,windowsCommand:r,expiresAt:i,unavailable:a,onRegenerate:o}=e,s=a===void 0?!1:a,[c,l]=(0,A.useState)(`posix`),u=c===`windows`?r:n,d;t[0]===u?d=t[1]:(d={text:u},t[0]=u,t[1]=d);let{copied:p,copy:m}=f(d),h;t[2]===i?h=t[3]:(h=()=>i-Date.now(),t[2]=i,t[3]=h);let[g,_]=(0,A.useState)(h),v,b;t[4]===i?(v=t[5],b=t[6]):(v=()=>{let e=setInterval(()=>_(i-Date.now()),1e3);return()=>clearInterval(e)},b=[i],t[4]=i,t[5]=v,t[6]=b),(0,A.useEffect)(v,b);let x=g<=0,S;t[7]===c?S=t[8]:(S=X.map(e=>(0,j.jsx)(y,{type:`button`,size:`sm`,variant:c===e.id?`secondary`:`ghost`,"aria-pressed":c===e.id,className:`h-6 px-2 text-xs`,onClick:()=>l(e.id),children:e.label},e.id)),t[7]=c,t[8]=S);let C;t[9]===c?C=t[10]:(C=c===`windows`?(0,j.jsx)(`span`,{className:`ml-auto text-xs text-subtle-foreground`,children:`Run in PowerShell`}):null,t[9]=c,t[10]=C);let w;t[11]!==S||t[12]!==C?(w=(0,j.jsxs)(`div`,{role:`group`,"aria-label":`Machine operating system`,className:`flex items-center gap-1 border-b border-border px-2 py-1.5`,children:[S,C]}),t[11]=S,t[12]=C,t[13]=w):w=t[13];let T;t[14]===u?T=t[15]:(T=(0,j.jsx)(`pre`,{className:`overflow-x-auto whitespace-pre-wrap break-all p-3 font-mono text-xs text-foreground`,children:u}),t[14]=u,t[15]=T);let E;t[16]!==x||t[17]!==o||t[18]!==g||t[19]!==s?(E=s?(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command used`}):x?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{role:`status`,className:`text-xs text-subtle-foreground`,children:`Command expired`}),(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`ghost`,className:`h-7 px-2 text-xs`,onClick:o,children:`Generate a new command`})]}):(0,j.jsxs)(`span`,{role:`status`,className:`text-xs tabular-nums text-subtle-foreground`,children:[`Command expires in `,Y(g)]}),t[16]=x,t[17]=o,t[18]=g,t[19]=s,t[20]=E):E=t[20];let D=x||s,O;t[21]===m?O=t[22]:(O=()=>void m(),t[21]=m,t[22]=O);let M=p?`Copied`:`Copy`,N;t[23]!==D||t[24]!==O||t[25]!==M?(N=(0,j.jsx)(y,{type:`button`,size:`sm`,variant:`outline`,className:`ml-auto h-7 px-2.5 text-xs`,disabled:D,onClick:O,children:M}),t[23]=D,t[24]=O,t[25]=M,t[26]=N):N=t[26];let P;t[27]!==E||t[28]!==N?(P=(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-border px-3 py-2`,children:[E,N]}),t[27]=E,t[28]=N,t[29]=P):P=t[29];let F;return t[30]!==P||t[31]!==w||t[32]!==T?(F=(0,j.jsxs)(`div`,{className:`overflow-hidden rounded-md border border-border bg-muted/30`,children:[w,T,P]}),t[30]=P,t[31]=w,t[32]=T,t[33]=F):F=t[33],F}export{Z as n,P as r,U as t};
|
|
Binary file
|
|
Binary file
|
package/app/dist/assets/{AppCommandShortcutHint-7JPI7Au-.js → AppCommandShortcutHint-CCVkbqD1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{po as r}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{po as r}from"./index-DCps_qBD.js";import{t as i}from"./shortcut-pill-BMlNncTw.js";var a=t(),o=e(n(),1);function s(e){let t=(0,a.c)(3),{shortcut:n,className:s}=e;if(!r()||!n)return null;let c;return t[0]!==s||t[1]!==n?(c=(0,o.jsx)(i,{shortcut:n,className:s}),t[0]=s,t[1]=n,t[2]=c):c=t[2],c}export{s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n}from"./boot-vendor-CKEhulXz.js";import{Wn as r,wh as i}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n}from"./boot-vendor-CKEhulXz.js";import{Wn as r,wh as i}from"./index-DCps_qBD.js";import{t as a}from"./useLocalOpenTargets-CtvcdlZg.js";import{t as o}from"./useResolvedLiveFileTarget-DlZUgf7A.js";var s=n(),c=e(t(),1);function l(e){let t=(0,s.c)(20),{intent:n,onSettled:l}=e,u=(0,c.useRef)(!1),d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d={enabled:!0},t[0]=d):d=t[0];let f=o(n.target,d),p=f.status===`available`,m;t[1]!==f.openContext||t[2]!==f.status?(m=f.status===`available`?{openContext:f.openContext}:{},t[1]=f.openContext,t[2]=f.status,t[3]=m):m=t[3];let h;t[4]!==p||t[5]!==m?(h={enabled:p,...m},t[4]=p,t[5]=m,t[6]=h):h=t[6];let{isLoading:g,openPathInPreferredFileTarget:_}=a(h),v;t[7]!==g||t[8]!==n.location||t[9]!==l||t[10]!==_||t[11]!==f.absolutePath||t[12]!==f.status?(v=()=>{if(u.current||f.status===`loading`||g)return;if(u.current=!0,l(),f.status===`unavailable`){i.error(`Failed to open file externally`,{description:`The file target is not available on its declared host.`});return}let e=r(n.location);_({columnNumber:e.columnNumber,lineNumber:e.lineNumber,path:f.absolutePath})},t[7]=g,t[8]=n.location,t[9]=l,t[10]=_,t[11]=f.absolutePath,t[12]=f.status,t[13]=v):v=t[13];let y;return t[14]!==g||t[15]!==n.location||t[16]!==l||t[17]!==_||t[18]!==f?(y=[n.location,g,_,l,f],t[14]=g,t[15]=n.location,t[16]=l,t[17]=_,t[18]=f,t[19]=y):y=t[19],(0,c.useEffect)(v,y),null}export{l as AppFileExternalNavigationDispatcher};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dp as i,Th as a,V as o,ya as s}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dp as i,Th as a,V as o,ya as s}from"./index-DCps_qBD.js";import{r as c,t as l}from"./dist-5xeFhhwk.js";var u=n(),d=e(t(),1),f=e(r(),1),p={top:`calc(env(safe-area-inset-top) + var(--bb-app-chrome-row-height) + 16px)`},m=[`top`,`left`,`right`];function h(){let e=(0,u.c)(8),t=o(),n=i(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[0]=r):r=e[0],(0,d.useEffect)(g,r);let a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a={zIndex:s.toast},e[1]=a):a=e[1];let c=n?`top-center`:`bottom-right`,h=n?p:void 0,_=n?p:void 0,v=n?m:void 0,y;return e[2]!==c||e[3]!==h||e[4]!==_||e[5]!==v||e[6]!==t?(y=(0,f.jsx)(l,{theme:t,style:a,position:c,offset:h,mobileOffset:_,swipeDirections:v}),e[2]=c,e[3]=h,e[4]=_,e[5]=v,e[6]=t,e[7]=y):y=e[7],y}function g(){a(c)}export{h as AppToasterView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Cr as t,Et as n,St as r,bt as i,dr as a,hi as o,kr as s,ri as c,t as l,vr as u,yr as d}from"./boot-vendor-CKEhulXz.js";import{Cr as f,Dh as p,Dp as m,Fh as h,Gd as g,Hf as _,Ia as v,Ir as y,Mo as b,Na as x,On as S,Rm as C,Sc as w,Sr as T,Vf as E,Vm as D,_o as O,br as k,bv as A,co as j,dd as M,dp as N,em as P,ht as F,jh as I,ki as L,mp as R,nt as z,uo as B,up as V,wp as H}from"./index-CfvM6UcU.js";import{n as U,r as W,t as G}from"./browser-url-jhAVtSw2.js";import{r as ee}from"./panelChromeClasses-BubpnwAb.js";import{a as K,i as q,n as J,r as te}from"./launcherRow-CqPaUYWn.js";var Y=e(o(),1),X=s(),ne=`bb.thread.browserHistory`,re=`1`,ie=24,Z=a(d({url:t().min(1),title:t().min(1).nullable(),visitedAt:u().int().nonnegative()}).strict()),ae=[],oe=M({parse:(e,t)=>{if(e===null)return t;try{let n=Z.safeParse(JSON.parse(e));return n.success?n.data:t}catch{return t}},serialize:e=>JSON.stringify(e)});function se(e){return`${ne}-${encodeURIComponent(e.trim())}-${re}`}var ce=n(ae),le=l(e=>i(se(e),ae,oe,{getOnInit:!0}));function ue(e){return e!=null&&e.trim().length>0}function de(e){let t=(0,X.c)(10),n;t[0]===e?n=t[1]:(n=ue(e)?le(e):ce,t[0]=e,t[1]=n);let[i,a]=r(n),o;t[2]===a?o=t[3]:(o=e=>{let{url:t,title:n}=e;t.length!==0&&a(e=>[{url:t,title:n,visitedAt:Date.now()},...e.filter(e=>e.url!==t)].slice(0,ie))},t[2]=a,t[3]=o);let s=o,c;t[4]===a?c=t[5]:(c=()=>{a(ae)},t[4]=a,t[5]=c);let l=c,u;return t[6]!==l||t[7]!==i||t[8]!==s?(u={entries:i,recordVisit:s,clear:l},t[6]=l,t[7]=i,t[8]=s,t[9]=u):u=t[9],u}var Q=e(c(),1);function fe(e){return e===null?null:`${e.activeMatchOrdinal}/${e.matches}`}function pe(e){let t=(0,X.c)(9),{icon:n,label:r,disabled:i,onClick:a,shortcut:o}=e,s=o?`${r} (${o.label})`:r,c=o?.ariaKeyshortcuts,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=h(`flex shrink-0 items-center justify-center transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40`,R,z),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=(0,Q.jsx)(p,{name:n,"aria-hidden":!0}),t[1]=n,t[2]=u);let d;return t[3]!==s||t[4]!==i||t[5]!==a||t[6]!==c||t[7]!==u?(d=(0,Q.jsx)(`button`,{type:`button`,onClick:a,disabled:i,"aria-label":s,"aria-keyshortcuts":c,className:l,children:u}),t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d}function me(e){let t=(0,X.c)(36),{inputRef:n,query:r,matches:i,onQueryChange:a,onFindNext:o,onFindPrevious:s,onClose:c,shortcut:l}=e,u;t[0]===i?u=t[1]:(u=fe(i),t[0]=i,t[1]=u);let d=u,f=i!==null&&i.matches>0,p=i!==null&&i.matches===0,m;t[2]!==c||t[3]!==o||t[4]!==s?(m=e=>{if(!e.nativeEvent.isComposing){if(e.key===`Enter`){e.preventDefault(),e.shiftKey?s():o();return}e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c())}},t[2]=c,t[3]=o,t[4]=s,t[5]=m):m=t[5];let g=m,_;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=h(`flex h-9 shrink-0 items-center gap-1 border-b border-border/70 py-1 pl-2 pr-2`,ee),t[6]=_):_=t[6];let v;t[7]===a?v=t[8]:(v=e=>a(e.target.value),t[7]=a,t[8]=v);let y=l?`Find in page (${l.label})`:`Find in page`,b=l?.ariaKeyshortcuts,x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(x=h(`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground`,H),t[9]=x):x=t[9];let S;t[10]!==g||t[11]!==n||t[12]!==r||t[13]!==v||t[14]!==y||t[15]!==b?(S=(0,Q.jsx)(`input`,{ref:n,type:`text`,value:r,onChange:v,onKeyDown:g,placeholder:`Find in page`,"aria-label":y,"aria-keyshortcuts":b,autoComplete:`off`,spellCheck:!1,maxLength:C,className:x}),t[10]=g,t[11]=n,t[12]=r,t[13]=v,t[14]=y,t[15]=b,t[16]=S):S=t[16];let w;t[17]!==d||t[18]!==p?(w=d===null?null:(0,Q.jsx)(`span`,{"data-testid":`browser-find-match-count`,"aria-live":`polite`,className:h(`shrink-0 tabular-nums`,p?`text-destructive`:`text-muted-foreground`,H),children:d}),t[17]=d,t[18]=p,t[19]=w):w=t[19];let T;t[20]!==S||t[21]!==w?(T=(0,Q.jsxs)(`div`,{className:`flex h-7 min-w-0 flex-1 items-center gap-2 rounded-md border border-border/70 bg-background/70 px-2`,children:[S,w]}),t[20]=S,t[21]=w,t[22]=T):T=t[22];let E=!f,D;t[23]!==s||t[24]!==E?(D=(0,Q.jsx)(pe,{icon:`ChevronUp`,label:`Previous match`,disabled:E,onClick:s}),t[23]=s,t[24]=E,t[25]=D):D=t[25];let O=!f,k;t[26]!==o||t[27]!==O?(k=(0,Q.jsx)(pe,{icon:`ChevronDown`,label:`Next match`,disabled:O,onClick:o}),t[26]=o,t[27]=O,t[28]=k):k=t[28];let A;t[29]===c?A=t[30]:(A=(0,Q.jsx)(pe,{icon:`X`,label:`Close find bar`,onClick:c}),t[29]=c,t[30]=A);let j;return t[31]!==T||t[32]!==D||t[33]!==k||t[34]!==A?(j=(0,Q.jsxs)(`div`,{"data-testid":`browser-find-bar`,role:`search`,"aria-label":`Find in page`,className:_,children:[T,D,k,A]}),t[31]=T,t[32]=D,t[33]=k,t[34]=A,t[35]=j):j=t[35],j}function he(e){let t=(0,X.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({onFocus:r,onBlur:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,Y.useRef)(null),o=(0,Y.useRef)(!1),s,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{o.current=!0,a.current=null},t=()=>{o.current=!1};return window.addEventListener(`blur`,e),window.addEventListener(`keydown`,t,!0),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`keydown`,t,!0)}},c=[],t[4]=s,t[5]=c):(s=t[4],c=t[5]),(0,Y.useEffect)(s,c);let l,u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>{a.current=e.button===0&&(o.current||document.activeElement!==e.currentTarget)?{x:e.clientX,y:e.clientY}:null,o.current=!1},u=e=>{let t=a.current;t!==null&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>4&&(a.current=null)},d=e=>{a.current!==null&&(a.current=null,e.preventDefault(),e.currentTarget.select())},t[6]=l,t[7]=u,t[8]=d):(l=t[6],u=t[7],d=t[8]);let f;t[9]===r?f=t[10]:(f=e=>{a.current===null&&!o.current&&e.currentTarget.select(),r?.(e)},t[9]=r,t[10]=f);let p;t[11]===n?p=t[12]:(p=e=>{a.current=null,n?.(e)},t[11]=n,t[12]=p);let m;return t[13]!==i||t[14]!==f||t[15]!==p?(m=(0,Q.jsx)(`input`,{type:`text`,placeholder:`Enter a URL`,autoComplete:`off`,spellCheck:!1,...i,onMouseDown:l,onMouseMove:u,onMouseUp:d,onFocus:f,onBlur:p}),t[13]=i,t[14]=f,t[15]=p,t[16]=m):m=t[16],m}function ge(e){let t=(0,X.c)(27),{entry:n,now:r,onNavigate:i}=e,a;t[0]===n.url?a=t[1]:(a=G(n.url),t[0]=n.url,t[1]=a);let o=a,s;t[2]===n.title?s=t[3]:(s=n.title?.trim(),t[2]=n.title,t[3]=s);let c=s,l=c&&c.length>0?c:o,u;t[4]!==n.visitedAt||t[5]!==r?(u=x({timestamp:n.visitedAt,now:r}),t[4]=n.visitedAt,t[5]=r,t[6]=u):u=t[6];let d=u,f;t[7]!==n.url||t[8]!==i?(f=()=>i(n.url),t[7]=n.url,t[8]=i,t[9]=f):f=t[9];let m=n.url,g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=h(J,`hover:bg-state-hover`),t[10]=g):g=t[10];let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Q.jsx)(`span`,{className:te,children:(0,Q.jsx)(p,{name:`Browser`,className:V,"aria-hidden":!0})}),t[11]=_):_=t[11];let v;t[12]===l?v=t[13]:(v=(0,Q.jsx)(`span`,{className:`truncate text-foreground`,children:l}),t[12]=l,t[13]=v);let y;t[14]!==o||t[15]!==l?(y=l===o?null:(0,Q.jsx)(`span`,{className:`truncate font-mono text-muted-foreground [flex-shrink:9999]`,children:o}),t[14]=o,t[15]=l,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let S;t[20]===d?S=t[21]:(S=(0,Q.jsx)(q,{idle:d,isActive:!1}),t[20]=d,t[21]=S);let C;return t[22]!==n.url||t[23]!==b||t[24]!==S||t[25]!==f?(C=(0,Q.jsxs)(`button`,{type:`button`,onClick:f,title:m,className:g,children:[_,b,S]}),t[22]=n.url,t[23]=b,t[24]=S,t[25]=f,t[26]=C):C=t[26],C}function _e(e){let t=(0,X.c)(17),{onNavigateInput:n,recent:r,onClearRecent:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=Date.now(),t[0]=a):a=t[0];let o=a;if(r.length===0)return null;let s=r.length,c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=h(`rounded text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,H),t[1]=c):c=t[1];let l;t[2]===i?l=t[3]:(l=(0,Q.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`Clear recently visited`,className:c,children:`Clear`}),t[2]=i,t[3]=l);let u;t[4]!==r.length||t[5]!==l?(u=(0,Q.jsx)(K,{label:`Recently visited`,count:s,action:l}),t[4]=r.length,t[5]=l,t[6]=u):u=t[6];let d;if(t[7]!==n||t[8]!==r){let e;t[10]===n?e=t[11]:(e=e=>(0,Q.jsx)(`li`,{children:(0,Q.jsx)(ge,{entry:e,now:o,onNavigate:n})},e.url),t[10]=n,t[11]=e),d=r.map(e),t[7]=n,t[8]=r,t[9]=d}else d=t[9];let f;t[12]===d?f=t[13]:(f=(0,Q.jsx)(`ul`,{"aria-label":`Recently visited`,className:`flex flex-col gap-px`,children:d}),t[12]=d,t[13]=f);let p;return t[14]!==u||t[15]!==f?(p=(0,Q.jsx)(`div`,{className:`flex h-full flex-col overflow-y-auto px-4 pb-6 pt-8`,children:(0,Q.jsx)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col gap-6`,children:(0,Q.jsxs)(`section`,{children:[u,f]})})}),t[14]=u,t[15]=f,t[16]=p):p=t[16],p}function ve({desktopBrowser:e,pluginId:t,tabId:n}){let r=e?.evaluate,i=e?.onPageMessage;return r===void 0||i===void 0?null:{async evaluate(e,i){let a=await r({tabId:n,expression:e,world:i?.world??`isolated`,channel:t});if(!a.ok)throw Error(a.error);return a.value},onMessage(e){return i(r=>{r.tabId===n&&r.channel===t&&e(r.data)})}}}function ye(e){let t=(0,X.c)(18),{slot:n,threadId:r,tabId:i,url:a,isCompactViewport:o}=e,s;t[0]!==n.pluginId||t[1]!==i?(s=ve({desktopBrowser:E(),pluginId:n.pluginId,tabId:i}),t[0]=n.pluginId,t[1]=i,t[2]=s):s=t[2];let c=s,l=n.component,u=`${r}/${i}`,d;t[3]!==l||t[4]!==o||t[5]!==c||t[6]!==i||t[7]!==r||t[8]!==a?(d=(0,Q.jsx)(l,{threadId:r,tabId:i,url:a,isCompactViewport:o,experimental_page:c}),t[3]=l,t[4]=o,t[5]=c,t[6]=i,t[7]=r,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==n.title||t[11]!==d?(f=(0,Q.jsx)(`span`,{role:`group`,"aria-label":n.title,className:`flex shrink-0 items-center`,children:d}),t[10]=n.title,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==n.id||t[14]!==n.pluginId||t[15]!==u||t[16]!==f?(p=(0,Q.jsx)(y,{pluginId:n.pluginId,slotKind:`browserToolbarAction`,slotId:n.id,instanceId:u,crashFallback:null,children:f}),t[13]=n.id,t[14]=n.pluginId,t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function be(e){let t=(0,X.c)(11),{threadId:n,tabId:r,url:i,isCompactViewport:a}=e,{browserToolbarActions:o}=P();if(o.length===0)return null;let s;if(t[0]!==o||t[1]!==a||t[2]!==r||t[3]!==n||t[4]!==i){let e;t[6]!==a||t[7]!==r||t[8]!==n||t[9]!==i?(e=e=>(0,Q.jsx)(ye,{slot:e,threadId:n,tabId:r,url:i,isCompactViewport:a},`${e.pluginId}/${e.id}/${e.generation}/${n}/${r}`),t[6]=a,t[7]=r,t[8]=n,t[9]=i,t[10]=e):e=t[10],s=o.map(e),t[0]=o,t[1]=a,t[2]=r,t[3]=n,t[4]=i,t[5]=s}else s=t[5];return s}var xe={x:0,y:0,width:0,height:0};function Se(e){return{x:Math.round(e.left),y:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)}}function Ce(){return{width:window.innerWidth,height:window.innerHeight}}function we(e){return D({bounds:Se(e.element.getBoundingClientRect()),viewport:Ce()})}function Te(e){return e===`flex-grow`||e===`flex-basis`}function Ee(e){return e.a.x===e.b.x&&e.a.y===e.b.y&&e.a.width===e.b.width&&e.a.height===e.b.height}function De(e){return L(e.url)?`Server not reachable`:e.errorText.includes(`ERR_BLOCKED_BY_CLIENT`)?`Page blocked`:`Page unavailable`}function Oe(e){let t=(0,X.c)(48),{addressDraft:n,isEditing:r,state:i,currentUrl:a,addressInputRef:o,onAddressChange:s,onAddressFocus:c,onAddressBlur:l,onAddressKeyDown:u,onSubmit:d,onBack:f,onForward:m,onReloadOrStop:g,onOpenExternal:_,locationShortcut:v,reloadShortcut:y,pluginActions:b}=e,x=i?.isLoading??!1,S;t[0]===a?S=t[1]:(S=U(a),t[0]=a,t[1]=S);let C=S,w=r?n:a,T,E;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=h(`relative h-11 shrink-0 overflow-hidden focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring max-md:pointer-coarse:h-[52px]`,ee),E=h(`absolute inset-x-0 top-0 flex h-11 translate-y-0 items-center gap-1 py-1.5 pl-2 pr-4 opacity-100 max-md:pointer-coarse:h-[52px]`),t[2]=T,t[3]=E):(T=t[2],E=t[3]);let D=!(i?.canGoBack??!1),O;t[4]!==f||t[5]!==D?(O=(0,Q.jsx)(pe,{icon:`ChevronLeft`,label:`Go back`,disabled:D,onClick:f}),t[4]=f,t[5]=D,t[6]=O):O=t[6];let k=!(i?.canGoForward??!1),A;t[7]!==m||t[8]!==k?(A=(0,Q.jsx)(pe,{icon:`ChevronRight`,label:`Go forward`,disabled:k,onClick:m}),t[7]=m,t[8]=k,t[9]=A):A=t[9];let j=x?`X`:`RotateCcw`,M=x?`Stop loading`:`Reload`,P=x?null:y,F;t[10]!==g||t[11]!==P||t[12]!==j||t[13]!==M?(F=(0,Q.jsx)(pe,{icon:j,label:M,shortcut:P,onClick:g}),t[10]=g,t[11]=P,t[12]=j,t[13]=M,t[14]=F):F=t[14];let I;t[15]===C?I=t[16]:(I=C===`secure`?(0,Q.jsx)(p,{name:`Lock`,className:h(N,`text-success`),"aria-label":`Secure connection`}):C===`insecure`?(0,Q.jsx)(p,{name:`AlertTriangle`,className:h(N,`text-warning`),"aria-label":`Connection not secure`}):(0,Q.jsx)(p,{name:`Search`,className:h(N,`text-muted-foreground`),"aria-hidden":!0}),t[15]=C,t[16]=I);let L;t[17]===s?L=t[18]:(L=e=>s(e.target.value),t[17]=s,t[18]=L);let R=v?`Address and search bar (${v.label})`:`Address and search bar`,z=v?.ariaKeyshortcuts,B;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=h(`min-w-0 flex-1 bg-transparent font-mono text-foreground outline-none placeholder:font-sans placeholder:text-muted-foreground`,H),t[19]=B):B=t[19];let V;t[20]!==o||t[21]!==w||t[22]!==l||t[23]!==c||t[24]!==u||t[25]!==L||t[26]!==R||t[27]!==z?(V=(0,Q.jsx)(he,{ref:o,value:w,onChange:L,onFocus:c,onBlur:l,onKeyDown:u,"aria-label":R,"aria-keyshortcuts":z,className:B}),t[20]=o,t[21]=w,t[22]=l,t[23]=c,t[24]=u,t[25]=L,t[26]=R,t[27]=z,t[28]=V):V=t[28];let W;t[29]!==I||t[30]!==V?(W=(0,Q.jsxs)(`div`,{className:`flex h-8 items-center gap-2 rounded-full border border-border/70 bg-background/70 px-3 max-md:pointer-coarse:h-10`,children:[I,V]}),t[29]=I,t[30]=V,t[31]=W):W=t[31];let G;t[32]!==d||t[33]!==W?(G=(0,Q.jsx)(`form`,{onSubmit:d,className:`min-w-0 flex-1`,children:W}),t[32]=d,t[33]=W,t[34]=G):G=t[34];let K=a.length===0,q;t[35]!==_||t[36]!==K?(q=(0,Q.jsx)(pe,{icon:`ExternalLink`,label:`Open in external browser`,disabled:K,onClick:_}),t[35]=_,t[36]=K,t[37]=q):q=t[37];let J;t[38]===x?J=t[39]:(J=x?(0,Q.jsx)(`span`,{className:`absolute inset-x-0 bottom-0 h-0.5 overflow-hidden`,children:(0,Q.jsx)(`span`,{className:`block h-full w-1/3 animate-pulse bg-ring/70 motion-reduce:animate-none`})}):null,t[38]=x,t[39]=J);let te;return t[40]!==b||t[41]!==F||t[42]!==G||t[43]!==q||t[44]!==J||t[45]!==O||t[46]!==A?(te=(0,Q.jsx)(`div`,{role:`region`,"aria-label":`Browser navigation`,tabIndex:-1,className:T,children:(0,Q.jsxs)(`div`,{className:E,children:[O,A,F,G,b,q,J]})}),t[40]=b,t[41]=F,t[42]=G,t[43]=q,t[44]=J,t[45]=O,t[46]=A,t[47]=te):te=t[47],te}function ke(){let e=(0,X.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,Q.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,Q.jsx)(p,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),(0,Q.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Browser tabs need the desktop app`}),(0,Q.jsx)(`p`,{className:h(`max-w-xs text-muted-foreground`,H),children:`The in-app web browser runs in the Moonlet desktop app. Open this thread there to browse the web.`})]}),e[0]=t):t=e[0],t}function Ae(e){let t=(0,X.c)(32),{errorText:n,onOpenExternal:r,onRetry:i,url:a}=e,o;t[0]===a?o=t[1]:(o=G(a),t[0]=a,t[1]=o);let s=o,c;t[2]!==n||t[3]!==a?(c=De({errorText:n,url:a}),t[2]=n,t[3]=a,t[4]=c):c=t[4];let l=c,u;t[5]!==s||t[6]!==a?(u=L(a)?`The browser could not reach ${s||`this local server`}. Start the server, then reload.`:`The browser could not load this page. Try reloading or opening it externally.`,t[5]=s,t[6]=a,t[7]=u):u=t[7];let d=u,f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-surface-recessed text-muted-foreground`,children:(0,Q.jsx)(p,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[8]=f):f=t[8];let m;t[9]===l?m=t[10]:(m=(0,Q.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:l}),t[9]=l,t[10]=m);let g;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(g=h(`mt-1 text-muted-foreground`,H),t[11]=g):g=t[11];let _;t[12]===d?_=t[13]:(_=(0,Q.jsx)(`p`,{className:g,children:d}),t[12]=d,t[13]=_);let v;t[14]!==m||t[15]!==_?(v=(0,Q.jsxs)(`div`,{children:[m,_]}),t[14]=m,t[15]=_,t[16]=v):v=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Q.jsx)(p,{name:`RotateCcw`,className:`size-3.5`,"aria-hidden":!0}),t[17]=y):y=t[17];let b;t[18]===i?b=t[19]:(b=(0,Q.jsxs)(`button`,{type:`button`,onClick:i,className:`inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-xs font-medium text-foreground transition-colors hover:bg-state-hover`,children:[y,`Reload`]}),t[18]=i,t[19]=b);let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(p,{name:`ExternalLink`,className:`size-3.5`,"aria-hidden":!0}),t[20]=x):x=t[20];let S;t[21]===r?S=t[22]:(S=(0,Q.jsxs)(`button`,{type:`button`,onClick:r,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground`,children:[x,`Open externally`]}),t[21]=r,t[22]=S);let C;t[23]!==b||t[24]!==S?(C=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2 pt-1`,children:[b,S]}),t[23]=b,t[24]=S,t[25]=C):C=t[25];let w;t[26]===n?w=t[27]:(w=(0,Q.jsx)(`p`,{className:`max-w-full truncate pt-1 font-mono text-[11px] text-subtle-foreground`,children:n}),t[26]=n,t[27]=w);let T;return t[28]!==C||t[29]!==w||t[30]!==v?(T=(0,Q.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center px-6 text-center`,children:(0,Q.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[f,v,C,w]})}),t[28]=C,t[29]=w,t[30]=v,t[31]=T):T=t[31],T}function je({tabId:e,desktopTarget:t,existingOnly:n,initialUrl:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:o,canHandleBrowserCommands:s=o,onNativeFocus:c,visibilityCoordinator:l,environmentId:u,threadId:d,onUpdate:p,onOpenInNewTab:h}){let g=B(`browser.focusLocation`),v=B(`browser.reload`),y=B(`browser.find`),x=(0,Y.useMemo)(()=>E(),[]),D=(0,Y.useRef)(null),k=(0,Y.useRef)(null),M=(0,Y.useRef)(null),N=w(),P=m(),{entries:F,recordVisit:I,clear:L}=de(d),[R,z]=(0,Y.useState)(null),[V,H]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{let t=!0,n=!1;H(null);let r=n=>{t&&n.tabId===e&&n.threadId===d&&H(n.control)},i=x?.onControl?.(t=>{t.tabId!==e||t.threadId!==d||(n=!0,r(t))});return x?.getControl?.(e).then(e=>{e!==null&&!n&&r(e)}).catch(()=>void 0),()=>{t=!1,i?.()}},[x,e,d]);let[U,G]=(0,Y.useState)(r),[ee,K]=(0,Y.useState)(r),[q,J]=(0,Y.useState)(!1),[te,X]=(0,Y.useState)(!1),[ne,re]=(0,Y.useState)(!1),ie=(0,Y.useRef)(!1);ie.current=ne;let[Z,ae]=(0,Y.useState)(``),[oe,se]=(0,Y.useState)(null),[ce,le]=(0,Y.useState)(null),ue=(0,Y.useRef)(p),fe=(0,Y.useRef)(I);ue.current=p,fe.current=I;let pe=(0,Y.useRef)(r),he=(0,Y.useRef)(n),ge=(0,Y.useRef)(t),[ve,ye]=(0,Y.useState)(null),Se=ve!==null&&ve.environmentId===u&&ve.tabId===e&&ve.threadId===d,Ce=U.length>0,De=x?.focus!==void 0&&x.onFocus!==void 0&&x.setVisibleWithoutFocus!==void 0,je=R?.errorText??null,Me=je!==null&&Ce,Ne=b(),Pe=(0,Y.useRef)(null),Fe=(0,Y.useCallback)(()=>{let e=D.current;return e===null?null:we({element:e})},[]),Ie=(0,Y.useCallback)(t=>{x!==null&&(Pe.current=t,x.setBounds({tabId:e,bounds:t}))},[x,e]),Le=(0,Y.useCallback)(({force:e})=>{let t=Fe();if(t===null)return;let n=Pe.current;!e&&n!==null&&Ee({a:n,b:t})||Ie(t)},[Fe,Ie]),Re=(0,Y.useCallback)(()=>{Le({force:!0})},[Le]),$=(0,Y.useCallback)(()=>{Le({force:!1})},[Le]),ze=(0,Y.useCallback)(()=>{let e=Fe();return Pe.current=e,e??xe},[Fe]);(0,Y.useEffect)(()=>{if(x===null)return;let t=ze(),n=pe.current;T({environmentId:u,tabId:e,threadId:d});let r=ge.current,i=he.current===!0&&(r===void 0||!f(e,r));x.attach({tabId:e,threadId:d,...i?{existingOnly:!0}:{},url:n,bounds:t,visible:!1}),ye({environmentId:u,tabId:e,threadId:d});let a=null,o=x.onState(t=>{t.tabId===e&&(a!==null&&(a.url!==t.url||t.isLoading&&!a.isLoading)&&se(null),a=t,z(t),G(t.url),ue.current({tabId:e,url:t.url,title:t.title}),!t.isLoading&&t.url.length>0&&fe.current({url:t.url,title:t.title}))}),s=x.onSnapshot?.(t=>{t.tabId===e&&le(t.dataUrl)}),c=x.onFindResult?.(t=>{t.tabId===e&&se({activeMatchOrdinal:t.activeMatchOrdinal,matches:t.matches})});return()=>{o(),s?.(),c?.(),ie.current&&x.stopFindInPage?.({tabId:e,action:`clearSelection`}),l?.release(e)}},[x,u,ze,l,e,d]),(0,Y.useEffect)(()=>{let e=D.current;if(e===null||x===null)return;let t=new ResizeObserver(()=>{$()});return t.observe(e),()=>{t.disconnect()}},[x,$]),(0,Y.useEffect)(()=>{if(x===null)return;let e=e=>{Te(e.propertyName)&&$()};return window.addEventListener(S,$),window.addEventListener(`resize`,$),document.addEventListener(`transitionend`,e,!0),document.addEventListener(`transitioncancel`,e,!0),()=>{window.removeEventListener(S,$),window.removeEventListener(`resize`,$),document.removeEventListener(`transitionend`,e,!0),document.removeEventListener(`transitioncancel`,e,!0)}},[x,$]);let Be=o&&(s||De)&&Ce&&!Me&&Se&&!Ne;(0,Y.useLayoutEffect)(()=>{if(l!==null){if(Be)return l.show(e,Re,{focus:!1}),()=>{l.hide(e)};l.hide(e)}},[l,e,Be,Re]),(0,Y.useLayoutEffect)(()=>{if(te){if(!o||!s||Me||Ne){X(!1);return}Be&&(X(!1),x?.focus?.(e))}},[te,o,s,Me,Ne,Be,x,e]),(0,Y.useEffect)(()=>{if(!(x?.onFocus===void 0||c===void 0))return x.onFocus(t=>{t===e&&c()})},[x,c,e]),(0,Y.useEffect)(()=>{if(i===null||i.tabId!==e)return;if(N){a?.(i);return}K(U),J(!0),k.current?.focus({preventScroll:!0});let t=requestAnimationFrame(()=>{k.current?.focus({preventScroll:!0}),a?.(i)});return()=>cancelAnimationFrame(t)},[i,U,N,a,e]);let Ve=(0,Y.useCallback)(t=>{let n=W(t);n!==null&&(G(n),J(!1),k.current?.blur(),x?.navigate({tabId:e,url:n}),X(!0))},[x,e]),He=(0,Y.useCallback)(e=>{e.preventDefault(),Ve(ee)},[ee,Ve]),Ue=(0,Y.useCallback)(e=>{if(e.nativeEvent.isComposing)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),K(U);let t=e.currentTarget;window.requestAnimationFrame(()=>{document.activeElement===t&&t.select()});return}if(h===null||e.key!==`Enter`||e.shiftKey||e.ctrlKey||!(A(O())?e.metaKey&&!e.altKey:e.altKey&&!e.metaKey))return;e.preventDefault();let t=W(ee);t!==null&&(K(U),J(!1),k.current?.blur(),h(t))},[ee,U,h]),We=(0,Y.useCallback)(()=>{K(U),J(!0)},[U]),Ge=(0,Y.useCallback)(()=>{if(R?.isLoading??!1){x?.stop(e);return}x?.reload(e)},[x,R?.isLoading,e]);j(`browser.focusLocation`,(0,Y.useCallback)(()=>!s||x===null?!1:(K(U),J(!0),k.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{k.current?.focus({preventScroll:!0}),k.current?.select()}),!0),[s,U,x]),100);let Ke=o&&x!==null&&x.findInPage!==void 0&&Ce,qe=(0,Y.useCallback)(t=>{x?.findInPage?.({tabId:e,...t})},[x,e]),Je=(0,Y.useCallback)(()=>{x?.stopFindInPage?.({tabId:e,action:`clearSelection`}),se(null)},[x,e]),Ye=(0,Y.useCallback)(()=>{M.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{M.current?.focus({preventScroll:!0}),M.current?.select()})},[]),Xe=(0,Y.useCallback)(e=>{let t=e.slice(0,C);if(ae(t),t.length===0){Je();return}qe({text:t,forward:!0,newSession:!0})},[Je,qe]),Ze=(0,Y.useCallback)(()=>{Z.length!==0&&qe({text:Z,forward:!0,newSession:!1})},[Z,qe]),Qe=(0,Y.useCallback)(()=>{Z.length!==0&&qe({text:Z,forward:!1,newSession:!1})},[Z,qe]),$e=(0,Y.useCallback)(()=>{re(!1),Je()},[Je]);j(`browser.find`,(0,Y.useCallback)(()=>Ke?(re(!0),Z.length>0&&qe({text:Z,forward:!0,newSession:!0}),Ye(),!0):!1,[Ke,Z,Ye,qe]),100),(0,Y.useEffect)(()=>{ne&&!Ke&&(re(!1),Je())},[Ke,Je,ne]),j(`browser.reload`,()=>!s||x===null||!Ce?!1:(x.reload(e),!0),100);let et=(0,Y.useCallback)(()=>{_()?.openExternalUrl(U)},[U]);return x===null?(0,Q.jsx)(ke,{}):(0,Q.jsxs)(`div`,{"data-app-browser":!0,className:`flex h-full min-h-0 flex-col`,children:[(0,Q.jsx)(Oe,{addressDraft:ee,isEditing:q,state:R,currentUrl:U,addressInputRef:k,onAddressChange:K,onAddressFocus:We,onAddressBlur:()=>J(!1),onAddressKeyDown:Ue,onSubmit:He,onBack:()=>{x.goBack(e)},onForward:()=>{x.goForward(e)},onReloadOrStop:Ge,onOpenExternal:et,locationShortcut:g,reloadShortcut:v,pluginActions:(0,Q.jsx)(be,{threadId:d,tabId:e,url:U,isCompactViewport:P})}),V===null?null:(0,Q.jsxs)(`div`,{role:`status`,className:`flex shrink-0 items-center gap-3 border-b border-border bg-surface-recessed px-3 py-2 text-xs`,children:[(0,Q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[V.controllerLabel,` is controlling this tab`]}),(0,Q.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>x.releaseControl?.(e),children:`Stop`}),(0,Q.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>{x.releaseControl?.(e),x.focus?.(e)},children:`Take over`})]}),ne?(0,Q.jsx)(me,{inputRef:M,query:Z,matches:oe,onQueryChange:Xe,onFindNext:Ze,onFindPrevious:Qe,onClose:$e,shortcut:y}):null,(0,Q.jsxs)(`div`,{ref:D,className:`relative min-h-0 flex-1`,children:[Me?(0,Q.jsx)(Ae,{errorText:je,onOpenExternal:et,onRetry:Ge,url:U}):Ce&&!Ne?null:(0,Q.jsx)(_e,{onNavigateInput:Ve,recent:F,onClearRecent:L}),Ce&&ce!==null?(0,Q.jsx)(`img`,{src:ce,alt:``,draggable:!1,className:`absolute inset-0 size-full`}):null]})]})}function Me(e,t){return t===null?null:e.find(e=>e.id===t)??null}var Ne=4,Pe=32,Fe=2e3;function Ie(e){return Math.min(250*2**(e-1),Fe)}function Le(e,t){if(e===void 0)return`open`;if(t.status===`pending`)return`pending`;let n=t.target;return n===null||n.hostId!==e.hostId?`unavailable`:n.instanceId===e.instanceId?`attach`:`check-saved-window`}function Re(e){let t=(0,X.c)(40),{browserTabs:n,activeBrowserTabId:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,environmentId:o,canShowNativeBrowserView:s,canHandleBrowserCommands:c,onNativeFocus:l,threadId:u,onUpdate:d,onOpenInNewTab:f}=e,p=i===void 0?null:i,m=c===void 0?s:c,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=E(),t[0]=h):h=t[0];let _=h,v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=_===null?null:k(_),t[1]=v):v=t[1];let y=v,b=Me(n,r),x=b?.desktopTarget,S=x?.hostId,C;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>_?.getTarget===void 0?{status:`ready`,target:null}:{status:`pending`},t[2]=C):C=t[2];let[w,T]=(0,Y.useState)(C),[D,O]=(0,Y.useState)(0),A=x===void 0?null:`${b?.id}:${D}:${x.hostId}:${x.instanceId}:${x.generation}`,[j,M]=(0,Y.useState)(null),N;t[3]!==A||t[4]!==M?(N=()=>{let e=_?.getTarget?.bind(_);if(e===void 0)return;let t=!0,n=0,r,i=()=>{e().catch(ze).then(e=>{if(t){if(e!==null){T({status:`ready`,target:e});return}if(n+=1,n>=Ne&&T({status:`ready`,target:null}),n>=Pe){M(A);return}r=setTimeout(i,Ie(n))}})};return i(),()=>{t=!1,clearTimeout(r)}},t[3]=A,t[4]=M,t[5]=N):N=t[5],(0,Y.useEffect)(N,[_,S,x?.instanceId,x?.generation,A]);let P=Le(x,w),F=P===`check-saved-window`?A:null,[I,L]=(0,Y.useState)(null),R=x?.instanceId,z;t[6]!==A||t[7]!==R||t[8]!==F||t[9]!==M||t[10]!==S?(z=()=>{if(F===null||S===void 0||R===void 0)return;let e=!0,t=0,n,r=()=>{g.experimental_desktopBrowsers.listInstances({hostId:S}).then(t=>{let{instances:n}=t;e&&L({key:F,status:n.some(e=>e.instanceId===R)?`live`:`gone`})},()=>{if(e){if(t+=1,t>=Ne&&L({key:F,status:`unknown`}),t>=Pe){M(A);return}n=setTimeout(r,Ie(t))}})};return r(),()=>{e=!1,clearTimeout(n)}},t[6]=A,t[7]=R,t[8]=F,t[9]=M,t[10]=S,t[11]=z):z=t[11];let B;if(t[12]!==A||t[13]!==R||t[14]!==F||t[15]!==S?(B=[F,S,R,A],t[12]=A,t[13]=R,t[14]=F,t[15]=S,t[16]=B):B=t[16],(0,Y.useEffect)(z,B),b===null)return null;let V=I?.key===F?I.status:null,H=A!==null&&j===A;if(P===`pending`||P===`check-saved-window`&&V===null){let e;return t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 bg-sidebar`}),t[17]=e):e=t[17],e}if(P===`unavailable`||P===`check-saved-window`&&V!==`gone`){let e;t[18]!==H||t[19]!==V||t[20]!==O?(e=H||V===`live`?()=>O($):null,t[18]=H,t[19]=V,t[20]=O,t[21]=e):e=t[21];let n=_===null?`desktop-required`:V===`live`?`other-window`:w.status===`ready`&&w.target!==null&&w.target.hostId!==x?.hostId?`other-computer`:H?`unreachable`:`reconnecting`,r;return t[22]!==b.url||t[23]!==n||t[24]!==e?(r=(0,Q.jsx)(Ve,{url:b.url,onRetry:e,reason:n}),t[22]=b.url,t[23]=n,t[24]=e,t[25]=r):r=t[25],r}let U=P===`attach`?!0:void 0,W=p?.tabId===b.id?p:null,G;return t[26]!==b.id||t[27]!==b.url||t[28]!==m||t[29]!==s||t[30]!==o||t[31]!==a||t[32]!==l||t[33]!==f||t[34]!==d||t[35]!==W||t[36]!==U||t[37]!==x||t[38]!==u?(G=(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-sidebar`,children:(0,Q.jsx)(je,{tabId:b.id,desktopTarget:x,existingOnly:U,initialUrl:b.url,addressFocusRequest:W,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:s,canHandleBrowserCommands:m,onNativeFocus:l,visibilityCoordinator:y,environmentId:o,threadId:u,onUpdate:d,onOpenInNewTab:f},b.id)}),t[26]=b.id,t[27]=b.url,t[28]=m,t[29]=s,t[30]=o,t[31]=a,t[32]=l,t[33]=f,t[34]=d,t[35]=W,t[36]=U,t[37]=x,t[38]=u,t[39]=G):G=t[39],G}function $(e){return e+1}function ze(){return null}var Be={"desktop-required":{title:`Browser tabs need the desktop app`,body:`This tab is open in the Moonlet desktop app.`},"other-window":{title:`This tab is open in another Moonlet window`,body:`Switch to that window to keep browsing.`},"other-computer":{title:`This tab is open on another computer`,body:`It was opened in Moonlet on a different computer.`},reconnecting:{title:`Reconnecting to this tab`,body:`The tab opens again as soon as Moonlet reconnects.`},unreachable:{title:`Can't reach this tab`,body:`Moonlet couldn't reconnect. Try again in a moment.`}};function Ve(e){let t=(0,X.c)(24),{url:n,reason:r,onRetry:i}=e,a=Be[r],o;t[0]===n?o=t[1]:(o=URL.canParse(n)?new URL(n):null,t[0]=n,t[1]=o);let s=o,c=s?.protocol===`https:`||s?.protocol===`http:`,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,Q.jsx)(p,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[2]=l):l=t[2];let u;t[3]===a.title?u=t[4]:(u=(0,Q.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:a.title}),t[3]=a.title,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=h(`max-w-xs text-muted-foreground`,H),t[5]=d):d=t[5];let f;t[6]===a.body?f=t[7]:(f=(0,Q.jsx)(`p`,{className:d,children:a.body}),t[6]=a.body,t[7]=f);let m;t[8]===n?m=t[9]:(m=n.length>0?(0,Q.jsx)(`p`,{className:h(`max-w-full truncate font-mono text-muted-foreground select-text`,H),title:n,children:n}):null,t[8]=n,t[9]=m);let g;t[10]===i?g=t[11]:(g=i===null?null:(0,Q.jsxs)(I,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:[(0,Q.jsx)(p,{name:`RotateCcw`,"aria-hidden":!0}),`Try again`]}),t[10]=i,t[11]=g);let _;t[12]!==c||t[13]!==i||t[14]!==n?(_=n.length>0?(0,Q.jsxs)(Q.Fragment,{children:[c?(0,Q.jsxs)(I,{type:`button`,variant:i===null?`outline`:`ghost`,size:`sm`,onClick:()=>F(n),children:[(0,Q.jsx)(p,{name:`ExternalLink`,"aria-hidden":!0}),`Open in browser`]}):null,(0,Q.jsxs)(I,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{v(n,{successMessage:`Link copied`})},children:[(0,Q.jsx)(p,{name:`Copy`,"aria-hidden":!0}),`Copy link`]})]}):null,t[12]=c,t[13]=i,t[14]=n,t[15]=_):_=t[15];let y;t[16]!==g||t[17]!==_?(y=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[g,_]}),t[16]=g,t[17]=_,t[18]=y):y=t[18];let b;return t[19]!==u||t[20]!==f||t[21]!==m||t[22]!==y?(b=(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-sidebar px-6 text-center`,children:[l,u,f,m,y]}),t[19]=u,t[20]=f,t[21]=m,t[22]=y,t[23]=b):b=t[23],b}export{Re as BrowserTabDeck};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Cr as t,Et as n,St as r,bt as i,dr as a,hi as o,kr as s,ri as c,t as l,vr as u,yr as d}from"./boot-vendor-CKEhulXz.js";import{Cr as f,Dh as p,Dp as m,Fh as h,Gd as g,Hf as _,Ia as v,Ir as y,Mo as b,Na as x,On as S,Rm as C,Sc as w,Sr as T,Vf as E,Vm as D,_o as O,br as k,bv as A,co as j,dd as M,dp as N,em as P,ht as F,jh as I,ki as L,mp as R,nt as z,uo as B,up as V,wp as H}from"./index-DCps_qBD.js";import{n as U,r as W,t as G}from"./browser-url-DQsPFWqd.js";import{r as ee}from"./panelChromeClasses-BubpnwAb.js";import{a as K,i as q,n as J,r as te}from"./launcherRow-CVYGyeOl.js";var Y=e(o(),1),X=s(),ne=`bb.thread.browserHistory`,re=`1`,ie=24,Z=a(d({url:t().min(1),title:t().min(1).nullable(),visitedAt:u().int().nonnegative()}).strict()),ae=[],oe=M({parse:(e,t)=>{if(e===null)return t;try{let n=Z.safeParse(JSON.parse(e));return n.success?n.data:t}catch{return t}},serialize:e=>JSON.stringify(e)});function se(e){return`${ne}-${encodeURIComponent(e.trim())}-${re}`}var ce=n(ae),le=l(e=>i(se(e),ae,oe,{getOnInit:!0}));function ue(e){return e!=null&&e.trim().length>0}function de(e){let t=(0,X.c)(10),n;t[0]===e?n=t[1]:(n=ue(e)?le(e):ce,t[0]=e,t[1]=n);let[i,a]=r(n),o;t[2]===a?o=t[3]:(o=e=>{let{url:t,title:n}=e;t.length!==0&&a(e=>[{url:t,title:n,visitedAt:Date.now()},...e.filter(e=>e.url!==t)].slice(0,ie))},t[2]=a,t[3]=o);let s=o,c;t[4]===a?c=t[5]:(c=()=>{a(ae)},t[4]=a,t[5]=c);let l=c,u;return t[6]!==l||t[7]!==i||t[8]!==s?(u={entries:i,recordVisit:s,clear:l},t[6]=l,t[7]=i,t[8]=s,t[9]=u):u=t[9],u}var Q=e(c(),1);function fe(e){return e===null?null:`${e.activeMatchOrdinal}/${e.matches}`}function pe(e){let t=(0,X.c)(9),{icon:n,label:r,disabled:i,onClick:a,shortcut:o}=e,s=o?`${r} (${o.label})`:r,c=o?.ariaKeyshortcuts,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=h(`flex shrink-0 items-center justify-center transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40`,R,z),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=(0,Q.jsx)(p,{name:n,"aria-hidden":!0}),t[1]=n,t[2]=u);let d;return t[3]!==s||t[4]!==i||t[5]!==a||t[6]!==c||t[7]!==u?(d=(0,Q.jsx)(`button`,{type:`button`,onClick:a,disabled:i,"aria-label":s,"aria-keyshortcuts":c,className:l,children:u}),t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d}function me(e){let t=(0,X.c)(36),{inputRef:n,query:r,matches:i,onQueryChange:a,onFindNext:o,onFindPrevious:s,onClose:c,shortcut:l}=e,u;t[0]===i?u=t[1]:(u=fe(i),t[0]=i,t[1]=u);let d=u,f=i!==null&&i.matches>0,p=i!==null&&i.matches===0,m;t[2]!==c||t[3]!==o||t[4]!==s?(m=e=>{if(!e.nativeEvent.isComposing){if(e.key===`Enter`){e.preventDefault(),e.shiftKey?s():o();return}e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),c())}},t[2]=c,t[3]=o,t[4]=s,t[5]=m):m=t[5];let g=m,_;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=h(`flex h-9 shrink-0 items-center gap-1 border-b border-border/70 py-1 pl-2 pr-2`,ee),t[6]=_):_=t[6];let v;t[7]===a?v=t[8]:(v=e=>a(e.target.value),t[7]=a,t[8]=v);let y=l?`Find in page (${l.label})`:`Find in page`,b=l?.ariaKeyshortcuts,x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(x=h(`min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground`,H),t[9]=x):x=t[9];let S;t[10]!==g||t[11]!==n||t[12]!==r||t[13]!==v||t[14]!==y||t[15]!==b?(S=(0,Q.jsx)(`input`,{ref:n,type:`text`,value:r,onChange:v,onKeyDown:g,placeholder:`Find in page`,"aria-label":y,"aria-keyshortcuts":b,autoComplete:`off`,spellCheck:!1,maxLength:C,className:x}),t[10]=g,t[11]=n,t[12]=r,t[13]=v,t[14]=y,t[15]=b,t[16]=S):S=t[16];let w;t[17]!==d||t[18]!==p?(w=d===null?null:(0,Q.jsx)(`span`,{"data-testid":`browser-find-match-count`,"aria-live":`polite`,className:h(`shrink-0 tabular-nums`,p?`text-destructive`:`text-muted-foreground`,H),children:d}),t[17]=d,t[18]=p,t[19]=w):w=t[19];let T;t[20]!==S||t[21]!==w?(T=(0,Q.jsxs)(`div`,{className:`flex h-7 min-w-0 flex-1 items-center gap-2 rounded-md border border-border/70 bg-background/70 px-2`,children:[S,w]}),t[20]=S,t[21]=w,t[22]=T):T=t[22];let E=!f,D;t[23]!==s||t[24]!==E?(D=(0,Q.jsx)(pe,{icon:`ChevronUp`,label:`Previous match`,disabled:E,onClick:s}),t[23]=s,t[24]=E,t[25]=D):D=t[25];let O=!f,k;t[26]!==o||t[27]!==O?(k=(0,Q.jsx)(pe,{icon:`ChevronDown`,label:`Next match`,disabled:O,onClick:o}),t[26]=o,t[27]=O,t[28]=k):k=t[28];let A;t[29]===c?A=t[30]:(A=(0,Q.jsx)(pe,{icon:`X`,label:`Close find bar`,onClick:c}),t[29]=c,t[30]=A);let j;return t[31]!==T||t[32]!==D||t[33]!==k||t[34]!==A?(j=(0,Q.jsxs)(`div`,{"data-testid":`browser-find-bar`,role:`search`,"aria-label":`Find in page`,className:_,children:[T,D,k,A]}),t[31]=T,t[32]=D,t[33]=k,t[34]=A,t[35]=j):j=t[35],j}function he(e){let t=(0,X.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({onFocus:r,onBlur:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=(0,Y.useRef)(null),o=(0,Y.useRef)(!1),s,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{let e=()=>{o.current=!0,a.current=null},t=()=>{o.current=!1};return window.addEventListener(`blur`,e),window.addEventListener(`keydown`,t,!0),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`keydown`,t,!0)}},c=[],t[4]=s,t[5]=c):(s=t[4],c=t[5]),(0,Y.useEffect)(s,c);let l,u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>{a.current=e.button===0&&(o.current||document.activeElement!==e.currentTarget)?{x:e.clientX,y:e.clientY}:null,o.current=!1},u=e=>{let t=a.current;t!==null&&Math.hypot(e.clientX-t.x,e.clientY-t.y)>4&&(a.current=null)},d=e=>{a.current!==null&&(a.current=null,e.preventDefault(),e.currentTarget.select())},t[6]=l,t[7]=u,t[8]=d):(l=t[6],u=t[7],d=t[8]);let f;t[9]===r?f=t[10]:(f=e=>{a.current===null&&!o.current&&e.currentTarget.select(),r?.(e)},t[9]=r,t[10]=f);let p;t[11]===n?p=t[12]:(p=e=>{a.current=null,n?.(e)},t[11]=n,t[12]=p);let m;return t[13]!==i||t[14]!==f||t[15]!==p?(m=(0,Q.jsx)(`input`,{type:`text`,placeholder:`Enter a URL`,autoComplete:`off`,spellCheck:!1,...i,onMouseDown:l,onMouseMove:u,onMouseUp:d,onFocus:f,onBlur:p}),t[13]=i,t[14]=f,t[15]=p,t[16]=m):m=t[16],m}function ge(e){let t=(0,X.c)(27),{entry:n,now:r,onNavigate:i}=e,a;t[0]===n.url?a=t[1]:(a=G(n.url),t[0]=n.url,t[1]=a);let o=a,s;t[2]===n.title?s=t[3]:(s=n.title?.trim(),t[2]=n.title,t[3]=s);let c=s,l=c&&c.length>0?c:o,u;t[4]!==n.visitedAt||t[5]!==r?(u=x({timestamp:n.visitedAt,now:r}),t[4]=n.visitedAt,t[5]=r,t[6]=u):u=t[6];let d=u,f;t[7]!==n.url||t[8]!==i?(f=()=>i(n.url),t[7]=n.url,t[8]=i,t[9]=f):f=t[9];let m=n.url,g;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(g=h(J,`hover:bg-state-hover`),t[10]=g):g=t[10];let _;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,Q.jsx)(`span`,{className:te,children:(0,Q.jsx)(p,{name:`Browser`,className:V,"aria-hidden":!0})}),t[11]=_):_=t[11];let v;t[12]===l?v=t[13]:(v=(0,Q.jsx)(`span`,{className:`truncate text-foreground`,children:l}),t[12]=l,t[13]=v);let y;t[14]!==o||t[15]!==l?(y=l===o?null:(0,Q.jsx)(`span`,{className:`truncate font-mono text-muted-foreground [flex-shrink:9999]`,children:o}),t[14]=o,t[15]=l,t[16]=y):y=t[16];let b;t[17]!==v||t[18]!==y?(b=(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[v,y]}),t[17]=v,t[18]=y,t[19]=b):b=t[19];let S;t[20]===d?S=t[21]:(S=(0,Q.jsx)(q,{idle:d,isActive:!1}),t[20]=d,t[21]=S);let C;return t[22]!==n.url||t[23]!==b||t[24]!==S||t[25]!==f?(C=(0,Q.jsxs)(`button`,{type:`button`,onClick:f,title:m,className:g,children:[_,b,S]}),t[22]=n.url,t[23]=b,t[24]=S,t[25]=f,t[26]=C):C=t[26],C}function _e(e){let t=(0,X.c)(17),{onNavigateInput:n,recent:r,onClearRecent:i}=e,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=Date.now(),t[0]=a):a=t[0];let o=a;if(r.length===0)return null;let s=r.length,c;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=h(`rounded text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`,H),t[1]=c):c=t[1];let l;t[2]===i?l=t[3]:(l=(0,Q.jsx)(`button`,{type:`button`,onClick:i,"aria-label":`Clear recently visited`,className:c,children:`Clear`}),t[2]=i,t[3]=l);let u;t[4]!==r.length||t[5]!==l?(u=(0,Q.jsx)(K,{label:`Recently visited`,count:s,action:l}),t[4]=r.length,t[5]=l,t[6]=u):u=t[6];let d;if(t[7]!==n||t[8]!==r){let e;t[10]===n?e=t[11]:(e=e=>(0,Q.jsx)(`li`,{children:(0,Q.jsx)(ge,{entry:e,now:o,onNavigate:n})},e.url),t[10]=n,t[11]=e),d=r.map(e),t[7]=n,t[8]=r,t[9]=d}else d=t[9];let f;t[12]===d?f=t[13]:(f=(0,Q.jsx)(`ul`,{"aria-label":`Recently visited`,className:`flex flex-col gap-px`,children:d}),t[12]=d,t[13]=f);let p;return t[14]!==u||t[15]!==f?(p=(0,Q.jsx)(`div`,{className:`flex h-full flex-col overflow-y-auto px-4 pb-6 pt-8`,children:(0,Q.jsx)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col gap-6`,children:(0,Q.jsxs)(`section`,{children:[u,f]})})}),t[14]=u,t[15]=f,t[16]=p):p=t[16],p}function ve({desktopBrowser:e,pluginId:t,tabId:n}){let r=e?.evaluate,i=e?.onPageMessage;return r===void 0||i===void 0?null:{async evaluate(e,i){let a=await r({tabId:n,expression:e,world:i?.world??`isolated`,channel:t});if(!a.ok)throw Error(a.error);return a.value},onMessage(e){return i(r=>{r.tabId===n&&r.channel===t&&e(r.data)})}}}function ye(e){let t=(0,X.c)(18),{slot:n,threadId:r,tabId:i,url:a,isCompactViewport:o}=e,s;t[0]!==n.pluginId||t[1]!==i?(s=ve({desktopBrowser:E(),pluginId:n.pluginId,tabId:i}),t[0]=n.pluginId,t[1]=i,t[2]=s):s=t[2];let c=s,l=n.component,u=`${r}/${i}`,d;t[3]!==l||t[4]!==o||t[5]!==c||t[6]!==i||t[7]!==r||t[8]!==a?(d=(0,Q.jsx)(l,{threadId:r,tabId:i,url:a,isCompactViewport:o,experimental_page:c}),t[3]=l,t[4]=o,t[5]=c,t[6]=i,t[7]=r,t[8]=a,t[9]=d):d=t[9];let f;t[10]!==n.title||t[11]!==d?(f=(0,Q.jsx)(`span`,{role:`group`,"aria-label":n.title,className:`flex shrink-0 items-center`,children:d}),t[10]=n.title,t[11]=d,t[12]=f):f=t[12];let p;return t[13]!==n.id||t[14]!==n.pluginId||t[15]!==u||t[16]!==f?(p=(0,Q.jsx)(y,{pluginId:n.pluginId,slotKind:`browserToolbarAction`,slotId:n.id,instanceId:u,crashFallback:null,children:f}),t[13]=n.id,t[14]=n.pluginId,t[15]=u,t[16]=f,t[17]=p):p=t[17],p}function be(e){let t=(0,X.c)(11),{threadId:n,tabId:r,url:i,isCompactViewport:a}=e,{browserToolbarActions:o}=P();if(o.length===0)return null;let s;if(t[0]!==o||t[1]!==a||t[2]!==r||t[3]!==n||t[4]!==i){let e;t[6]!==a||t[7]!==r||t[8]!==n||t[9]!==i?(e=e=>(0,Q.jsx)(ye,{slot:e,threadId:n,tabId:r,url:i,isCompactViewport:a},`${e.pluginId}/${e.id}/${e.generation}/${n}/${r}`),t[6]=a,t[7]=r,t[8]=n,t[9]=i,t[10]=e):e=t[10],s=o.map(e),t[0]=o,t[1]=a,t[2]=r,t[3]=n,t[4]=i,t[5]=s}else s=t[5];return s}var xe={x:0,y:0,width:0,height:0};function Se(e){return{x:Math.round(e.left),y:Math.round(e.top),width:Math.round(e.width),height:Math.round(e.height)}}function Ce(){return{width:window.innerWidth,height:window.innerHeight}}function we(e){return D({bounds:Se(e.element.getBoundingClientRect()),viewport:Ce()})}function Te(e){return e===`flex-grow`||e===`flex-basis`}function Ee(e){return e.a.x===e.b.x&&e.a.y===e.b.y&&e.a.width===e.b.width&&e.a.height===e.b.height}function De(e){return L(e.url)?`Server not reachable`:e.errorText.includes(`ERR_BLOCKED_BY_CLIENT`)?`Page blocked`:`Page unavailable`}function Oe(e){let t=(0,X.c)(48),{addressDraft:n,isEditing:r,state:i,currentUrl:a,addressInputRef:o,onAddressChange:s,onAddressFocus:c,onAddressBlur:l,onAddressKeyDown:u,onSubmit:d,onBack:f,onForward:m,onReloadOrStop:g,onOpenExternal:_,locationShortcut:v,reloadShortcut:y,pluginActions:b}=e,x=i?.isLoading??!1,S;t[0]===a?S=t[1]:(S=U(a),t[0]=a,t[1]=S);let C=S,w=r?n:a,T,E;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=h(`relative h-11 shrink-0 overflow-hidden focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ring max-md:pointer-coarse:h-[52px]`,ee),E=h(`absolute inset-x-0 top-0 flex h-11 translate-y-0 items-center gap-1 py-1.5 pl-2 pr-4 opacity-100 max-md:pointer-coarse:h-[52px]`),t[2]=T,t[3]=E):(T=t[2],E=t[3]);let D=!(i?.canGoBack??!1),O;t[4]!==f||t[5]!==D?(O=(0,Q.jsx)(pe,{icon:`ChevronLeft`,label:`Go back`,disabled:D,onClick:f}),t[4]=f,t[5]=D,t[6]=O):O=t[6];let k=!(i?.canGoForward??!1),A;t[7]!==m||t[8]!==k?(A=(0,Q.jsx)(pe,{icon:`ChevronRight`,label:`Go forward`,disabled:k,onClick:m}),t[7]=m,t[8]=k,t[9]=A):A=t[9];let j=x?`X`:`RotateCcw`,M=x?`Stop loading`:`Reload`,P=x?null:y,F;t[10]!==g||t[11]!==P||t[12]!==j||t[13]!==M?(F=(0,Q.jsx)(pe,{icon:j,label:M,shortcut:P,onClick:g}),t[10]=g,t[11]=P,t[12]=j,t[13]=M,t[14]=F):F=t[14];let I;t[15]===C?I=t[16]:(I=C===`secure`?(0,Q.jsx)(p,{name:`Lock`,className:h(N,`text-success`),"aria-label":`Secure connection`}):C===`insecure`?(0,Q.jsx)(p,{name:`AlertTriangle`,className:h(N,`text-warning`),"aria-label":`Connection not secure`}):(0,Q.jsx)(p,{name:`Search`,className:h(N,`text-muted-foreground`),"aria-hidden":!0}),t[15]=C,t[16]=I);let L;t[17]===s?L=t[18]:(L=e=>s(e.target.value),t[17]=s,t[18]=L);let R=v?`Address and search bar (${v.label})`:`Address and search bar`,z=v?.ariaKeyshortcuts,B;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=h(`min-w-0 flex-1 bg-transparent font-mono text-foreground outline-none placeholder:font-sans placeholder:text-muted-foreground`,H),t[19]=B):B=t[19];let V;t[20]!==o||t[21]!==w||t[22]!==l||t[23]!==c||t[24]!==u||t[25]!==L||t[26]!==R||t[27]!==z?(V=(0,Q.jsx)(he,{ref:o,value:w,onChange:L,onFocus:c,onBlur:l,onKeyDown:u,"aria-label":R,"aria-keyshortcuts":z,className:B}),t[20]=o,t[21]=w,t[22]=l,t[23]=c,t[24]=u,t[25]=L,t[26]=R,t[27]=z,t[28]=V):V=t[28];let W;t[29]!==I||t[30]!==V?(W=(0,Q.jsxs)(`div`,{className:`flex h-8 items-center gap-2 rounded-full border border-border/70 bg-background/70 px-3 max-md:pointer-coarse:h-10`,children:[I,V]}),t[29]=I,t[30]=V,t[31]=W):W=t[31];let G;t[32]!==d||t[33]!==W?(G=(0,Q.jsx)(`form`,{onSubmit:d,className:`min-w-0 flex-1`,children:W}),t[32]=d,t[33]=W,t[34]=G):G=t[34];let K=a.length===0,q;t[35]!==_||t[36]!==K?(q=(0,Q.jsx)(pe,{icon:`ExternalLink`,label:`Open in external browser`,disabled:K,onClick:_}),t[35]=_,t[36]=K,t[37]=q):q=t[37];let J;t[38]===x?J=t[39]:(J=x?(0,Q.jsx)(`span`,{className:`absolute inset-x-0 bottom-0 h-0.5 overflow-hidden`,children:(0,Q.jsx)(`span`,{className:`block h-full w-1/3 animate-pulse bg-ring/70 motion-reduce:animate-none`})}):null,t[38]=x,t[39]=J);let te;return t[40]!==b||t[41]!==F||t[42]!==G||t[43]!==q||t[44]!==J||t[45]!==O||t[46]!==A?(te=(0,Q.jsx)(`div`,{role:`region`,"aria-label":`Browser navigation`,tabIndex:-1,className:T,children:(0,Q.jsxs)(`div`,{className:E,children:[O,A,F,G,b,q,J]})}),t[40]=b,t[41]=F,t[42]=G,t[43]=q,t[44]=J,t[45]=O,t[46]=A,t[47]=te):te=t[47],te}function ke(){let e=(0,X.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3 px-6 text-center`,children:[(0,Q.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,Q.jsx)(p,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),(0,Q.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Browser tabs need the desktop app`}),(0,Q.jsx)(`p`,{className:h(`max-w-xs text-muted-foreground`,H),children:`The in-app web browser runs in the Moonlet desktop app. Open this thread there to browse the web.`})]}),e[0]=t):t=e[0],t}function Ae(e){let t=(0,X.c)(32),{errorText:n,onOpenExternal:r,onRetry:i,url:a}=e,o;t[0]===a?o=t[1]:(o=G(a),t[0]=a,t[1]=o);let s=o,c;t[2]!==n||t[3]!==a?(c=De({errorText:n,url:a}),t[2]=n,t[3]=a,t[4]=c):c=t[4];let l=c,u;t[5]!==s||t[6]!==a?(u=L(a)?`The browser could not reach ${s||`this local server`}. Start the server, then reload.`:`The browser could not load this page. Try reloading or opening it externally.`,t[5]=s,t[6]=a,t[7]=u):u=t[7];let d=u,f;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-surface-recessed text-muted-foreground`,children:(0,Q.jsx)(p,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[8]=f):f=t[8];let m;t[9]===l?m=t[10]:(m=(0,Q.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:l}),t[9]=l,t[10]=m);let g;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(g=h(`mt-1 text-muted-foreground`,H),t[11]=g):g=t[11];let _;t[12]===d?_=t[13]:(_=(0,Q.jsx)(`p`,{className:g,children:d}),t[12]=d,t[13]=_);let v;t[14]!==m||t[15]!==_?(v=(0,Q.jsxs)(`div`,{children:[m,_]}),t[14]=m,t[15]=_,t[16]=v):v=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Q.jsx)(p,{name:`RotateCcw`,className:`size-3.5`,"aria-hidden":!0}),t[17]=y):y=t[17];let b;t[18]===i?b=t[19]:(b=(0,Q.jsxs)(`button`,{type:`button`,onClick:i,className:`inline-flex h-8 items-center gap-1.5 rounded-md border border-border bg-background px-2.5 text-xs font-medium text-foreground transition-colors hover:bg-state-hover`,children:[y,`Reload`]}),t[18]=i,t[19]=b);let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(p,{name:`ExternalLink`,className:`size-3.5`,"aria-hidden":!0}),t[20]=x):x=t[20];let S;t[21]===r?S=t[22]:(S=(0,Q.jsxs)(`button`,{type:`button`,onClick:r,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground`,children:[x,`Open externally`]}),t[21]=r,t[22]=S);let C;t[23]!==b||t[24]!==S?(C=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2 pt-1`,children:[b,S]}),t[23]=b,t[24]=S,t[25]=C):C=t[25];let w;t[26]===n?w=t[27]:(w=(0,Q.jsx)(`p`,{className:`max-w-full truncate pt-1 font-mono text-[11px] text-subtle-foreground`,children:n}),t[26]=n,t[27]=w);let T;return t[28]!==C||t[29]!==w||t[30]!==v?(T=(0,Q.jsx)(`div`,{className:`flex h-full flex-col items-center justify-center px-6 text-center`,children:(0,Q.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[f,v,C,w]})}),t[28]=C,t[29]=w,t[30]=v,t[31]=T):T=t[31],T}function je({tabId:e,desktopTarget:t,existingOnly:n,initialUrl:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:o,canHandleBrowserCommands:s=o,onNativeFocus:c,visibilityCoordinator:l,environmentId:u,threadId:d,onUpdate:p,onOpenInNewTab:h}){let g=B(`browser.focusLocation`),v=B(`browser.reload`),y=B(`browser.find`),x=(0,Y.useMemo)(()=>E(),[]),D=(0,Y.useRef)(null),k=(0,Y.useRef)(null),M=(0,Y.useRef)(null),N=w(),P=m(),{entries:F,recordVisit:I,clear:L}=de(d),[R,z]=(0,Y.useState)(null),[V,H]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{let t=!0,n=!1;H(null);let r=n=>{t&&n.tabId===e&&n.threadId===d&&H(n.control)},i=x?.onControl?.(t=>{t.tabId!==e||t.threadId!==d||(n=!0,r(t))});return x?.getControl?.(e).then(e=>{e!==null&&!n&&r(e)}).catch(()=>void 0),()=>{t=!1,i?.()}},[x,e,d]);let[U,G]=(0,Y.useState)(r),[ee,K]=(0,Y.useState)(r),[q,J]=(0,Y.useState)(!1),[te,X]=(0,Y.useState)(!1),[ne,re]=(0,Y.useState)(!1),ie=(0,Y.useRef)(!1);ie.current=ne;let[Z,ae]=(0,Y.useState)(``),[oe,se]=(0,Y.useState)(null),[ce,le]=(0,Y.useState)(null),ue=(0,Y.useRef)(p),fe=(0,Y.useRef)(I);ue.current=p,fe.current=I;let pe=(0,Y.useRef)(r),he=(0,Y.useRef)(n),ge=(0,Y.useRef)(t),[ve,ye]=(0,Y.useState)(null),Se=ve!==null&&ve.environmentId===u&&ve.tabId===e&&ve.threadId===d,Ce=U.length>0,De=x?.focus!==void 0&&x.onFocus!==void 0&&x.setVisibleWithoutFocus!==void 0,je=R?.errorText??null,Me=je!==null&&Ce,Ne=b(),Pe=(0,Y.useRef)(null),Fe=(0,Y.useCallback)(()=>{let e=D.current;return e===null?null:we({element:e})},[]),Ie=(0,Y.useCallback)(t=>{x!==null&&(Pe.current=t,x.setBounds({tabId:e,bounds:t}))},[x,e]),Le=(0,Y.useCallback)(({force:e})=>{let t=Fe();if(t===null)return;let n=Pe.current;!e&&n!==null&&Ee({a:n,b:t})||Ie(t)},[Fe,Ie]),Re=(0,Y.useCallback)(()=>{Le({force:!0})},[Le]),$=(0,Y.useCallback)(()=>{Le({force:!1})},[Le]),ze=(0,Y.useCallback)(()=>{let e=Fe();return Pe.current=e,e??xe},[Fe]);(0,Y.useEffect)(()=>{if(x===null)return;let t=ze(),n=pe.current;T({environmentId:u,tabId:e,threadId:d});let r=ge.current,i=he.current===!0&&(r===void 0||!f(e,r));x.attach({tabId:e,threadId:d,...i?{existingOnly:!0}:{},url:n,bounds:t,visible:!1}),ye({environmentId:u,tabId:e,threadId:d});let a=null,o=x.onState(t=>{t.tabId===e&&(a!==null&&(a.url!==t.url||t.isLoading&&!a.isLoading)&&se(null),a=t,z(t),G(t.url),ue.current({tabId:e,url:t.url,title:t.title}),!t.isLoading&&t.url.length>0&&fe.current({url:t.url,title:t.title}))}),s=x.onSnapshot?.(t=>{t.tabId===e&&le(t.dataUrl)}),c=x.onFindResult?.(t=>{t.tabId===e&&se({activeMatchOrdinal:t.activeMatchOrdinal,matches:t.matches})});return()=>{o(),s?.(),c?.(),ie.current&&x.stopFindInPage?.({tabId:e,action:`clearSelection`}),l?.release(e)}},[x,u,ze,l,e,d]),(0,Y.useEffect)(()=>{let e=D.current;if(e===null||x===null)return;let t=new ResizeObserver(()=>{$()});return t.observe(e),()=>{t.disconnect()}},[x,$]),(0,Y.useEffect)(()=>{if(x===null)return;let e=e=>{Te(e.propertyName)&&$()};return window.addEventListener(S,$),window.addEventListener(`resize`,$),document.addEventListener(`transitionend`,e,!0),document.addEventListener(`transitioncancel`,e,!0),()=>{window.removeEventListener(S,$),window.removeEventListener(`resize`,$),document.removeEventListener(`transitionend`,e,!0),document.removeEventListener(`transitioncancel`,e,!0)}},[x,$]);let Be=o&&(s||De)&&Ce&&!Me&&Se&&!Ne;(0,Y.useLayoutEffect)(()=>{if(l!==null){if(Be)return l.show(e,Re,{focus:!1}),()=>{l.hide(e)};l.hide(e)}},[l,e,Be,Re]),(0,Y.useLayoutEffect)(()=>{if(te){if(!o||!s||Me||Ne){X(!1);return}Be&&(X(!1),x?.focus?.(e))}},[te,o,s,Me,Ne,Be,x,e]),(0,Y.useEffect)(()=>{if(!(x?.onFocus===void 0||c===void 0))return x.onFocus(t=>{t===e&&c()})},[x,c,e]),(0,Y.useEffect)(()=>{if(i===null||i.tabId!==e)return;if(N){a?.(i);return}K(U),J(!0),k.current?.focus({preventScroll:!0});let t=requestAnimationFrame(()=>{k.current?.focus({preventScroll:!0}),a?.(i)});return()=>cancelAnimationFrame(t)},[i,U,N,a,e]);let Ve=(0,Y.useCallback)(t=>{let n=W(t);n!==null&&(G(n),J(!1),k.current?.blur(),x?.navigate({tabId:e,url:n}),X(!0))},[x,e]),He=(0,Y.useCallback)(e=>{e.preventDefault(),Ve(ee)},[ee,Ve]),Ue=(0,Y.useCallback)(e=>{if(e.nativeEvent.isComposing)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),K(U);let t=e.currentTarget;window.requestAnimationFrame(()=>{document.activeElement===t&&t.select()});return}if(h===null||e.key!==`Enter`||e.shiftKey||e.ctrlKey||!(A(O())?e.metaKey&&!e.altKey:e.altKey&&!e.metaKey))return;e.preventDefault();let t=W(ee);t!==null&&(K(U),J(!1),k.current?.blur(),h(t))},[ee,U,h]),We=(0,Y.useCallback)(()=>{K(U),J(!0)},[U]),Ge=(0,Y.useCallback)(()=>{if(R?.isLoading??!1){x?.stop(e);return}x?.reload(e)},[x,R?.isLoading,e]);j(`browser.focusLocation`,(0,Y.useCallback)(()=>!s||x===null?!1:(K(U),J(!0),k.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{k.current?.focus({preventScroll:!0}),k.current?.select()}),!0),[s,U,x]),100);let Ke=o&&x!==null&&x.findInPage!==void 0&&Ce,qe=(0,Y.useCallback)(t=>{x?.findInPage?.({tabId:e,...t})},[x,e]),Je=(0,Y.useCallback)(()=>{x?.stopFindInPage?.({tabId:e,action:`clearSelection`}),se(null)},[x,e]),Ye=(0,Y.useCallback)(()=>{M.current?.focus({preventScroll:!0}),window.requestAnimationFrame(()=>{M.current?.focus({preventScroll:!0}),M.current?.select()})},[]),Xe=(0,Y.useCallback)(e=>{let t=e.slice(0,C);if(ae(t),t.length===0){Je();return}qe({text:t,forward:!0,newSession:!0})},[Je,qe]),Ze=(0,Y.useCallback)(()=>{Z.length!==0&&qe({text:Z,forward:!0,newSession:!1})},[Z,qe]),Qe=(0,Y.useCallback)(()=>{Z.length!==0&&qe({text:Z,forward:!1,newSession:!1})},[Z,qe]),$e=(0,Y.useCallback)(()=>{re(!1),Je()},[Je]);j(`browser.find`,(0,Y.useCallback)(()=>Ke?(re(!0),Z.length>0&&qe({text:Z,forward:!0,newSession:!0}),Ye(),!0):!1,[Ke,Z,Ye,qe]),100),(0,Y.useEffect)(()=>{ne&&!Ke&&(re(!1),Je())},[Ke,Je,ne]),j(`browser.reload`,()=>!s||x===null||!Ce?!1:(x.reload(e),!0),100);let et=(0,Y.useCallback)(()=>{_()?.openExternalUrl(U)},[U]);return x===null?(0,Q.jsx)(ke,{}):(0,Q.jsxs)(`div`,{"data-app-browser":!0,className:`flex h-full min-h-0 flex-col`,children:[(0,Q.jsx)(Oe,{addressDraft:ee,isEditing:q,state:R,currentUrl:U,addressInputRef:k,onAddressChange:K,onAddressFocus:We,onAddressBlur:()=>J(!1),onAddressKeyDown:Ue,onSubmit:He,onBack:()=>{x.goBack(e)},onForward:()=>{x.goForward(e)},onReloadOrStop:Ge,onOpenExternal:et,locationShortcut:g,reloadShortcut:v,pluginActions:(0,Q.jsx)(be,{threadId:d,tabId:e,url:U,isCompactViewport:P})}),V===null?null:(0,Q.jsxs)(`div`,{role:`status`,className:`flex shrink-0 items-center gap-3 border-b border-border bg-surface-recessed px-3 py-2 text-xs`,children:[(0,Q.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[V.controllerLabel,` is controlling this tab`]}),(0,Q.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>x.releaseControl?.(e),children:`Stop`}),(0,Q.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 hover:bg-state-hover`,onClick:()=>{x.releaseControl?.(e),x.focus?.(e)},children:`Take over`})]}),ne?(0,Q.jsx)(me,{inputRef:M,query:Z,matches:oe,onQueryChange:Xe,onFindNext:Ze,onFindPrevious:Qe,onClose:$e,shortcut:y}):null,(0,Q.jsxs)(`div`,{ref:D,className:`relative min-h-0 flex-1`,children:[Me?(0,Q.jsx)(Ae,{errorText:je,onOpenExternal:et,onRetry:Ge,url:U}):Ce&&!Ne?null:(0,Q.jsx)(_e,{onNavigateInput:Ve,recent:F,onClearRecent:L}),Ce&&ce!==null?(0,Q.jsx)(`img`,{src:ce,alt:``,draggable:!1,className:`absolute inset-0 size-full`}):null]})]})}function Me(e,t){return t===null?null:e.find(e=>e.id===t)??null}var Ne=4,Pe=32,Fe=2e3;function Ie(e){return Math.min(250*2**(e-1),Fe)}function Le(e,t){if(e===void 0)return`open`;if(t.status===`pending`)return`pending`;let n=t.target;return n===null||n.hostId!==e.hostId?`unavailable`:n.instanceId===e.instanceId?`attach`:`check-saved-window`}function Re(e){let t=(0,X.c)(40),{browserTabs:n,activeBrowserTabId:r,addressFocusRequest:i,onAddressFocusRequestConsumed:a,environmentId:o,canShowNativeBrowserView:s,canHandleBrowserCommands:c,onNativeFocus:l,threadId:u,onUpdate:d,onOpenInNewTab:f}=e,p=i===void 0?null:i,m=c===void 0?s:c,h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=E(),t[0]=h):h=t[0];let _=h,v;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=_===null?null:k(_),t[1]=v):v=t[1];let y=v,b=Me(n,r),x=b?.desktopTarget,S=x?.hostId,C;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>_?.getTarget===void 0?{status:`ready`,target:null}:{status:`pending`},t[2]=C):C=t[2];let[w,T]=(0,Y.useState)(C),[D,O]=(0,Y.useState)(0),A=x===void 0?null:`${b?.id}:${D}:${x.hostId}:${x.instanceId}:${x.generation}`,[j,M]=(0,Y.useState)(null),N;t[3]!==A||t[4]!==M?(N=()=>{let e=_?.getTarget?.bind(_);if(e===void 0)return;let t=!0,n=0,r,i=()=>{e().catch(ze).then(e=>{if(t){if(e!==null){T({status:`ready`,target:e});return}if(n+=1,n>=Ne&&T({status:`ready`,target:null}),n>=Pe){M(A);return}r=setTimeout(i,Ie(n))}})};return i(),()=>{t=!1,clearTimeout(r)}},t[3]=A,t[4]=M,t[5]=N):N=t[5],(0,Y.useEffect)(N,[_,S,x?.instanceId,x?.generation,A]);let P=Le(x,w),F=P===`check-saved-window`?A:null,[I,L]=(0,Y.useState)(null),R=x?.instanceId,z;t[6]!==A||t[7]!==R||t[8]!==F||t[9]!==M||t[10]!==S?(z=()=>{if(F===null||S===void 0||R===void 0)return;let e=!0,t=0,n,r=()=>{g.experimental_desktopBrowsers.listInstances({hostId:S}).then(t=>{let{instances:n}=t;e&&L({key:F,status:n.some(e=>e.instanceId===R)?`live`:`gone`})},()=>{if(e){if(t+=1,t>=Ne&&L({key:F,status:`unknown`}),t>=Pe){M(A);return}n=setTimeout(r,Ie(t))}})};return r(),()=>{e=!1,clearTimeout(n)}},t[6]=A,t[7]=R,t[8]=F,t[9]=M,t[10]=S,t[11]=z):z=t[11];let B;if(t[12]!==A||t[13]!==R||t[14]!==F||t[15]!==S?(B=[F,S,R,A],t[12]=A,t[13]=R,t[14]=F,t[15]=S,t[16]=B):B=t[16],(0,Y.useEffect)(z,B),b===null)return null;let V=I?.key===F?I.status:null,H=A!==null&&j===A;if(P===`pending`||P===`check-saved-window`&&V===null){let e;return t[17]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 bg-sidebar`}),t[17]=e):e=t[17],e}if(P===`unavailable`||P===`check-saved-window`&&V!==`gone`){let e;t[18]!==H||t[19]!==V||t[20]!==O?(e=H||V===`live`?()=>O($):null,t[18]=H,t[19]=V,t[20]=O,t[21]=e):e=t[21];let n=_===null?`desktop-required`:V===`live`?`other-window`:w.status===`ready`&&w.target!==null&&w.target.hostId!==x?.hostId?`other-computer`:H?`unreachable`:`reconnecting`,r;return t[22]!==b.url||t[23]!==n||t[24]!==e?(r=(0,Q.jsx)(Ve,{url:b.url,onRetry:e,reason:n}),t[22]=b.url,t[23]=n,t[24]=e,t[25]=r):r=t[25],r}let U=P===`attach`?!0:void 0,W=p?.tabId===b.id?p:null,G;return t[26]!==b.id||t[27]!==b.url||t[28]!==m||t[29]!==s||t[30]!==o||t[31]!==a||t[32]!==l||t[33]!==f||t[34]!==d||t[35]!==W||t[36]!==U||t[37]!==x||t[38]!==u?(G=(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col bg-sidebar`,children:(0,Q.jsx)(je,{tabId:b.id,desktopTarget:x,existingOnly:U,initialUrl:b.url,addressFocusRequest:W,onAddressFocusRequestConsumed:a,canShowNativeBrowserView:s,canHandleBrowserCommands:m,onNativeFocus:l,visibilityCoordinator:y,environmentId:o,threadId:u,onUpdate:d,onOpenInNewTab:f},b.id)}),t[26]=b.id,t[27]=b.url,t[28]=m,t[29]=s,t[30]=o,t[31]=a,t[32]=l,t[33]=f,t[34]=d,t[35]=W,t[36]=U,t[37]=x,t[38]=u,t[39]=G):G=t[39],G}function $(e){return e+1}function ze(){return null}var Be={"desktop-required":{title:`Browser tabs need the desktop app`,body:`This tab is open in the Moonlet desktop app.`},"other-window":{title:`This tab is open in another Moonlet window`,body:`Switch to that window to keep browsing.`},"other-computer":{title:`This tab is open on another computer`,body:`It was opened in Moonlet on a different computer.`},reconnecting:{title:`Reconnecting to this tab`,body:`The tab opens again as soon as Moonlet reconnects.`},unreachable:{title:`Can't reach this tab`,body:`Moonlet couldn't reconnect. Try again in a moment.`}};function Ve(e){let t=(0,X.c)(24),{url:n,reason:r,onRetry:i}=e,a=Be[r],o;t[0]===n?o=t[1]:(o=URL.canParse(n)?new URL(n):null,t[0]=n,t[1]=o);let s=o,c=s?.protocol===`https:`||s?.protocol===`http:`,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,Q.jsx)(`span`,{className:`flex size-11 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground`,children:(0,Q.jsx)(p,{name:`Globe`,className:`size-6`,"aria-hidden":!0})}),t[2]=l):l=t[2];let u;t[3]===a.title?u=t[4]:(u=(0,Q.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:a.title}),t[3]=a.title,t[4]=u);let d;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=h(`max-w-xs text-muted-foreground`,H),t[5]=d):d=t[5];let f;t[6]===a.body?f=t[7]:(f=(0,Q.jsx)(`p`,{className:d,children:a.body}),t[6]=a.body,t[7]=f);let m;t[8]===n?m=t[9]:(m=n.length>0?(0,Q.jsx)(`p`,{className:h(`max-w-full truncate font-mono text-muted-foreground select-text`,H),title:n,children:n}):null,t[8]=n,t[9]=m);let g;t[10]===i?g=t[11]:(g=i===null?null:(0,Q.jsxs)(I,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:[(0,Q.jsx)(p,{name:`RotateCcw`,"aria-hidden":!0}),`Try again`]}),t[10]=i,t[11]=g);let _;t[12]!==c||t[13]!==i||t[14]!==n?(_=n.length>0?(0,Q.jsxs)(Q.Fragment,{children:[c?(0,Q.jsxs)(I,{type:`button`,variant:i===null?`outline`:`ghost`,size:`sm`,onClick:()=>F(n),children:[(0,Q.jsx)(p,{name:`ExternalLink`,"aria-hidden":!0}),`Open in browser`]}):null,(0,Q.jsxs)(I,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>{v(n,{successMessage:`Link copied`})},children:[(0,Q.jsx)(p,{name:`Copy`,"aria-hidden":!0}),`Copy link`]})]}):null,t[12]=c,t[13]=i,t[14]=n,t[15]=_):_=t[15];let y;t[16]!==g||t[17]!==_?(y=(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[g,_]}),t[16]=g,t[17]=_,t[18]=y):y=t[18];let b;return t[19]!==u||t[20]!==f||t[21]!==m||t[22]!==y?(b=(0,Q.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col items-center justify-center gap-3 bg-sidebar px-6 text-center`,children:[l,u,f,m,y]}),t[19]=u,t[20]=f,t[21]=m,t[22]=y,t[23]=b):b=t[23],b}export{Re as BrowserTabDeck};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{$a as a,Cm as o,Dp as s,Fh as c,ao as l,em as u,xm as d}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Br as t,hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{$a as a,Cm as o,Dp as s,Fh as c,ao as l,em as u,xm as d}from"./index-DCps_qBD.js";import{i as f,n as p,r as m,t as h}from"./PaletteShell-BMkwhUdz.js";import{r as g}from"./settings-sections-Dfo35J2q.js";import{s as _,t as v}from"./settings-nav-D5tWYG52.js";var y=e(n(),1),b=r();function x(){let e=typeof window>`u`?void 0:window.bbDesktop;return e?.getServerChoices&&e.onServerChoicesChange&&e.selectServer?{list:e.getServerChoices.bind(e),subscribe:e.onServerChoicesChange.bind(e),select:e.selectServer.bind(e)}:null}function ee(){let e=(0,b.c)(7),[t]=(0,y.useState)(x),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0];let[r,i]=(0,y.useState)(n),a,o;e[1]===t?(a=e[2],o=e[3]):(a=()=>{if(t===null)return;let e=!1,n=!1,r=t.subscribe(t=>{n=!0,e||i(t)});return t.list().then(t=>{!e&&!n&&i(t)}).catch(S),()=>{e=!0,r()}},o=[t],e[1]=t,e[2]=a,e[3]=o),(0,y.useEffect)(a,o);let s=t?.select,c;return e[4]!==r||e[5]!==s?(c={choices:r,select:s},e[4]=r,e[5]=s,e[6]=c):c=e[6],c}function S(){}var te=[`Threads`,`Actions`,`Settings`,`Plugins`];function ne(e){return[...e.sections.map(t=>({id:`settings:${t.id}`,bucket:`Settings`,group:`Settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(g(t.id))})),...e.pluginEntries.map(t=>({id:`settings:plugin:${t.id}`,bucket:`Settings`,group:`Plugin settings`,title:`${t.label} settings`,shortcut:null,run:()=>e.navigate(d({pluginId:t.id}))}))]}function re(e){return e.panels.map(t=>({id:`plugin-page:${t.pluginId}/${t.id}`,bucket:`Plugins`,group:`Plugin pages`,title:t.title,shortcut:null,run:()=>e.navigate(o({pluginId:t.pluginId,path:t.path}))}))}var C=e(i(),1),ie=l(`thread.search`);function ae(e){let n=(0,b.c)(60),{actions:r,installedPlugins:i,recents:o,query:c,onQueryChange:l,onChoose:d}=e,m=t(),g=s(),x=(0,y.useId)(),S=(0,y.useId)(),[ae,w]=(0,y.useState)(0),T=u(),de=v(T.fileOpeners),E;n[0]!==i||n[1]!==T.settingsSections?(E=_({installedPlugins:i,settingsSections:T.settingsSections}),n[0]=i,n[1]=T.settingsSections,n[2]=E):E=n[2];let fe=E,D;n[3]===m?D=n[4]:(D=e=>void m(e),n[3]=m,n[4]=D);let O;n[5]!==fe||n[6]!==de||n[7]!==D?(O=ne({navigate:D,pluginEntries:fe,sections:de}),n[5]=fe,n[6]=de,n[7]=D,n[8]=O):O=n[8];let pe=O,k;n[9]===m?k=n[10]:(k=e=>void m(e),n[9]=m,n[10]=k);let A;n[11]!==T.navPanels||n[12]!==k?(A=re({navigate:k,panels:T.navPanels}),n[11]=T.navPanels,n[12]=k,n[13]=A):A=n[13];let me=A,{choices:he,select:j}=ee(),M;n[14]!==he||n[15]!==j?(M=j===void 0?[]:he.filter(le).map(e=>({id:`server:${e.id}`,title:`Switch to ${e.name}`,bucket:`Actions`,group:`Servers`,shortcut:null,run:()=>j(e.id)})),n[14]=he,n[15]=j,n[16]=M):M=n[16];let N=M,P;n[17]!==r||n[18]!==me||n[19]!==N||n[20]!==pe?(P=[...r,...pe,...me,...N],n[17]=r,n[18]=me,n[19]=N,n[20]=pe,n[21]=P):P=n[21];let ge=P,F;n[22]===c?F=n[23]:(F=c.startsWith(`>`)?c.slice(1):c,n[22]=c,n[23]=F);let I=F,L;n[24]!==ge||n[25]!==I||n[26]!==o?(L=f({actions:ge,query:I,recentIds:o}),n[24]=ge,n[25]=I,n[26]=o,n[27]=L):L=n[27];let R=L,z;n[28]===I?z=n[29]:(z=I.trim(),n[28]=I,n[29]=z);let B=z===``,V;if(n[30]!==R){let e=te.map(e=>({bucket:e,entries:R.filter(t=>t.action.bucket===e)})).filter(ce);V=e.map((t,n)=>({...t,startIndex:e.slice(0,n).reduce(se,0)})),n[30]=R,n[31]=V}else V=n[31];let H=V,U;n[32]!==B||n[33]!==R||n[34]!==H?(U=B?H.flatMap(oe):R,n[32]=B,n[33]=R,n[34]=H,n[35]=U):U=n[35];let W=U,G=W.length===0?-1:Math.min(ae,W.length-1),K=(0,y.useRef)(null),q=(0,y.useRef)(!1),J;n[36]===Symbol.for(`react.memo_cache_sentinel`)?(J=()=>{q.current&&(q.current=!1,K.current?.querySelector(`[aria-selected="true"]`)?.scrollIntoView({block:`nearest`}))},n[36]=J):J=n[36];let Y;n[37]===G?Y=n[38]:(Y=[G],n[37]=G,n[38]=Y),(0,y.useEffect)(J,Y);let X;n[39]!==G||n[40]!==d||n[41]!==W?(X=e=>{if(!e.nativeEvent.isComposing&&W.length!==0){if(e.key===`ArrowDown`){e.preventDefault(),q.current=!0,w(e=>e+1>=W.length?0:e+1);return}if(e.key===`ArrowUp`){e.preventDefault(),q.current=!0,w(e=>e<=0?W.length-1:e-1);return}if(e.key===`Home`){e.preventDefault(),q.current=!0,w(0);return}if(e.key===`End`){e.preventDefault(),q.current=!0,w(W.length-1);return}if(e.key===`Enter`){let t=W[G];if(t===void 0)return;e.preventDefault(),d(t.action)}}},n[39]=G,n[40]=d,n[41]=W,n[42]=X):X=n[42];let _e=X,ve=G===-1?void 0:`${S}-${G}`,Z;n[43]===l?Z=n[44]:(Z=e=>{l(e),w(0),K.current!==null&&(K.current.scrollTop=0)},n[43]=l,n[44]=Z);let Q;n[45]!==G||n[46]!==g||n[47]!==B||n[48]!==d||n[49]!==S||n[50]!==H||n[51]!==W?(Q=!B&&W.length===0?(0,C.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching commands`}):B?H.map(e=>{let t=`${S}-${e.bucket.toLowerCase()}-label`;return(0,C.jsxs)(`div`,{role:`group`,"aria-labelledby":t,"data-palette-bucket":e.bucket,children:[(0,C.jsx)(`div`,{id:t,className:h,children:e.bucket}),e.entries.map((t,n)=>{let r=e.startIndex+n;return(0,C.jsx)(ue,{entry:t,id:`${S}-${r}`,isActive:r===G,isDrillIn:t.action.id===ie,showShortcut:!g,onActivate:()=>{w(r)},onSelect:()=>d(t.action)},t.action.id)})]},e.bucket)}):W.map((e,t)=>(0,C.jsx)(ue,{entry:e,id:`${S}-${t}`,isActive:t===G,isDrillIn:e.action.id===ie,showShortcut:!g,onActivate:()=>{w(t)},onSelect:()=>d(e.action)},e.action.id)),n[45]=G,n[46]=g,n[47]=B,n[48]=d,n[49]=S,n[50]=H,n[51]=W,n[52]=Q):Q=n[52];let $;return n[53]!==_e||n[54]!==x||n[55]!==c||n[56]!==ve||n[57]!==Z||n[58]!==Q?($=(0,C.jsx)(p,{activeDescendantId:ve,inputDescription:a.description,inputLabel:a.label,listId:x,listLabel:`Commands`,listRef:K,onInputChange:Z,onInputKeyDown:_e,placeholder:a.placeholder,value:c,children:Q}),n[53]=_e,n[54]=x,n[55]=c,n[56]=ve,n[57]=Z,n[58]=Q,n[59]=$):$=n[59],$}function oe(e){return e.entries}function se(e,t){return e+t.entries.length}function ce(e){return e.entries.length>0}function le(e){return!e.active}function ue(e){let t=(0,b.c)(19),{entry:n,id:r,isActive:i,isDrillIn:a,showShortcut:o,onActivate:s,onSelect:l}=e,u=n.action.group===`Browser`||n.action.id.startsWith(`plugin:`)?n.action.group:null,d=a?`${n.action.title}…`:n.action.title,f=o?n.action.shortcut:null,p=u!==null||f!==null||a,h=a?`drill-in`:`terminal`,g=i&&`bg-state-hover text-foreground`,_;t[0]===g?_=t[1]:(_=c(`flex min-h-8 w-full min-w-0 cursor-pointer items-center gap-3 rounded-md px-2 py-1.5 text-left text-sm outline-none`,g),t[0]=g,t[1]=_);let v;t[2]!==n.positions||t[3]!==d?(v=(0,C.jsx)(`span`,{className:`min-w-0 truncate`,children:(0,C.jsx)(w,{title:d,positions:n.positions})}),t[2]=n.positions,t[3]=d,t[4]=v):v=t[4];let y;t[5]!==p||t[6]!==a||t[7]!==u||t[8]!==f?(y=p?(0,C.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[u===null?null:(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:u}),f===null?null:(0,C.jsx)(m,{children:f.label}),a?(0,C.jsx)(`span`,{className:`sr-only`,children:`Opens a search view`}):null]}):null,t[5]=p,t[6]=a,t[7]=u,t[8]=f,t[9]=y):y=t[9];let x;return t[10]!==r||t[11]!==i||t[12]!==s||t[13]!==l||t[14]!==h||t[15]!==_||t[16]!==v||t[17]!==y?(x=(0,C.jsxs)(`div`,{id:r,role:`option`,"aria-selected":i,"data-palette-action-kind":h,className:_,onPointerMove:s,onClick:l,children:[v,y]}),t[10]=r,t[11]=i,t[12]=s,t[13]=l,t[14]=h,t[15]=_,t[16]=v,t[17]=y,t[18]=x):x=t[18],x}function w(e){let t=(0,b.c)(9),{title:n,positions:r}=e;if(r.length===0){let e;return t[0]===n?e=t[1]:(e=(0,C.jsx)(C.Fragment,{children:n}),t[0]=n,t[1]=e),e}let i;t[2]===r?i=t[3]:(i=new Set(r),t[2]=r,t[3]=i);let a=i,o;t[4]===n?o=t[5]:(o=[...n],t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,C.jsx)(C.Fragment,{children:o.map((e,t)=>a.has(t)?(0,C.jsx)(`span`,{className:`font-semibold text-foreground`,children:e},t):(0,C.jsx)(`span`,{children:e},t))}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}export{ae as CommandPaletteBody};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{$ as r}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{$ as r}from"./index-DCps_qBD.js";import{r as i}from"./git-diff-patch-text-SHpUxhZL.js";import{t as a}from"./MoonletDiffSplit-3xEwFpfu.js";import{a as o,n as s,t as c}from"./code-rendering-DjLdb6cB.js";var l=t(),u=e(n(),1),d=`diffRenderer`;function f(e){let t=(0,l.c)(25),{file:n,patchText:f,fullFileContents:p,view:m,overflow:h,showLineNumbers:g,className:_,onSelectionAddToChat:v}=e,y=m===void 0?s:m,b=h===void 0?c:h,x=g===void 0?!0:g,S=o(),C=S.kind===`plugin`,w;t[0]!==n||t[1]!==C||t[2]!==f?(w=C?f??i(n):``,t[0]=n,t[1]=C,t[2]=f,t[3]=w):w=t[3];let T=w,E;t[4]!==_||t[5]!==n||t[6]!==p||t[7]!==v||t[8]!==b||t[9]!==f||t[10]!==x||t[11]!==y?(E=(0,u.jsx)(a,{file:n,patchText:f,fullFileContents:p,view:y,overflow:b,showLineNumbers:x,className:_,onSelectionAddToChat:v}),t[4]=_,t[5]=n,t[6]=p,t[7]=v,t[8]=b,t[9]=f,t[10]=x,t[11]=y,t[12]=E):E=t[12];let D=E,O;t[13]!==_||t[14]!==n.name||t[15]!==p||t[16]!==b||t[17]!==T||t[18]!==x||t[19]!==y?(O=(e,t)=>(0,u.jsx)(`div`,{className:_,children:(0,u.jsx)(e.component,{patch:T,path:n.name,view:y,overflow:b,showLineNumbers:x,experimental_fullFileContents:p,Original:t})}),t[13]=_,t[14]=n.name,t[15]=p,t[16]=b,t[17]=T,t[18]=x,t[19]=y,t[20]=O):O=t[20];let k;return t[21]!==D||t[22]!==S||t[23]!==O?(k=(0,u.jsx)(r,{replacement:S,original:D,slotKind:d,children:O}),t[21]=D,t[22]=S,t[23]=O,t[24]=k):k=t[24],k}export{f as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Bi as r,Gn as i,Hi as a,Ia as o,Ui as s,Vi as c,Wi as l,Wn as u,Xn as d,em as f}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{kr as t,ri as n}from"./boot-vendor-CKEhulXz.js";import{Bi as r,Gn as i,Hi as a,Ia as o,Ui as s,Vi as c,Wi as l,Wn as u,Xn as d,em as f}from"./index-DCps_qBD.js";import{t as p}from"./useLocalOpenTargets-CtvcdlZg.js";import{t as m}from"./useResolvedLiveFileTarget-DlZUgf7A.js";var h=t(),g=e(n(),1);function _(e){let t=i(e),n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():null}function v(e){let t=(0,h.c)(40),{intent:n}=e,v=d(),y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={enabled:!0},t[0]=y):y=t[0];let b=m(n.target,y),x=b.status===`available`,S;t[1]!==b.openContext||t[2]!==b.status?(S=b.status===`available`?{openContext:b.openContext}:{},t[1]=b.openContext,t[2]=b.status,t[3]=S):S=t[3];let C;t[4]!==x||t[5]!==S?(C={enabled:x,...S},t[4]=x,t[5]=S,t[6]=C):C=t[6];let w=p(C),{fileOpeners:T}=f(),E,D,O,k;if(t[7]!==T||t[8]!==n||t[9]!==w||t[10]!==v||t[11]!==b.absolutePath||t[12]!==b.status){let e=_(n.target.path),i=e===null?[]:T.filter(t=>t.extensions.includes(e)),o=u(n.location);t[17]!==n||t[18]!==v?(E=(0,g.jsx)(r,{onSelect:()=>v.openFilePreview(n),children:`Open preview`}),t[17]=n,t[18]=v,t[19]=E):E=t[19],D=i.length>0?(0,g.jsxs)(a,{children:[(0,g.jsx)(l,{children:`Open with`}),(0,g.jsxs)(s,{className:`min-w-52`,children:[(0,g.jsx)(r,{onSelect:()=>v.openFilePreview({...n,viewer:`builtin`}),children:`Moonlet preview`}),i.map(e=>(0,g.jsx)(r,{onSelect:()=>v.openFilePreview({...n,viewer:{pluginId:e.pluginId,openerId:e.id}}),children:e.title},`${e.pluginId}:${e.id}`))]})]}):null;let c=b.status!==`available`||w.isLoading||!w.canOpenPreferredFileTarget,d;t[20]!==n||t[21]!==v?(d=()=>v.openFileExternally(n),t[20]=n,t[21]=v,t[22]=d):d=t[22],t[23]!==d||t[24]!==c?(O=(0,g.jsx)(r,{disabled:c,onSelect:d,children:`Open externally`}),t[23]=d,t[24]=c,t[25]=O):O=t[25],k=b.status===`available`&&w.fileOpenTargets.length>0?(0,g.jsxs)(a,{children:[(0,g.jsx)(l,{children:`Open in`}),(0,g.jsx)(s,{className:`min-w-52`,children:w.fileOpenTargets.map(e=>(0,g.jsx)(r,{onSelect:()=>{w.openPathInFileTarget({columnNumber:o.columnNumber,lineNumber:o.lineNumber,path:b.absolutePath,rememberTarget:!1,targetId:e.id})},children:e.label},e.id))})]}):null,t[7]=T,t[8]=n,t[9]=w,t[10]=v,t[11]=b.absolutePath,t[12]=b.status,t[13]=E,t[14]=D,t[15]=O,t[16]=k}else E=t[13],D=t[14],O=t[15],k=t[16];let A;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,g.jsx)(c,{}),t[26]=A):A=t[26];let j;t[27]!==n.target.path||t[28]!==b.absolutePath||t[29]!==b.status?(j=(0,g.jsx)(r,{onSelect:()=>{o(b.status===`available`?b.absolutePath:n.target.path,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:`Copy file path`}),t[27]=n.target.path,t[28]=b.absolutePath,t[29]=b.status,t[30]=j):j=t[30];let M;t[31]===n.target.path?M=t[32]:(M=(0,g.jsx)(r,{onSelect:()=>{o(i(n.target.path),{successMessage:`File name copied`,errorMessage:`Failed to copy file name`})},children:`Copy file name`}),t[31]=n.target.path,t[32]=M);let N;return t[33]!==j||t[34]!==M||t[35]!==E||t[36]!==D||t[37]!==O||t[38]!==k?(N=(0,g.jsxs)(g.Fragment,{children:[E,D,O,k,A,j,M]}),t[33]=j,t[34]=M,t[35]=E,t[36]=D,t[37]=O,t[38]=k,t[39]=N):N=t[39],N}export{v as ExperimentalFileLinkMenu};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-BM3Ffeng.js";import{hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{$f as a,Dh as o,Dp as s,Fh as c,Ia as l,Pn as u,Sc as d,Zt as f,aa as p,da as m,dp as h,ep as g,ha as _,ht as v,jh as y,la as b,np as x,oa as S,ra as C,sa as w,tp as T,ua as E,uo as D,wp as O}from"./index-
|
|
1
|
+
import{o as e,r as t}from"./rolldown-runtime-BM3Ffeng.js";import{hi as n,kr as r,ri as i}from"./boot-vendor-CKEhulXz.js";import{$f as a,Dh as o,Dp as s,Fh as c,Ia as l,Pn as u,Sc as d,Zt as f,aa as p,da as m,dp as h,ep as g,ha as _,ht as v,jh as y,la as b,np as x,oa as S,ra as C,sa as w,tp as T,ua as E,uo as D,wp as O}from"./index-DCps_qBD.js";import{n as k}from"./code-loading-skeletons-CkiXPS0M.js";import{a as A,i as j,o as M,r as N,t as P}from"./TimelineSelectionMenu-DDYrgVgK.js";import{t as F}from"./esm-CUQGeFi6.js";import{a as I,n as ee,r as te,t as ne}from"./useElementWidth-EbzKQ0bg.js";import{n as L}from"./save-file-B8sl9wgP.js";import{t as re}from"./AppCommandShortcutHint-CCVkbqD1.js";import{n as R,r as z}from"./image-lightbox-DhNslR-8.js";import{h as ie,m as ae,t as B}from"./markdown-preview-CGXXNhJo.js";import{n as V}from"./SourceCodeHost-DkoXO-RM.js";import{t as oe}from"./open-in-editor-button-tA10Nkqn.js";var H=r(),U=e(n(),1),W=(0,U.createContext)(null),G=e(i(),1);function K(e,t){return t===null||!(e.target instanceof Node)?!1:t.contains(e.target)}function q(e,t){let{commonAncestorContainer:n}=e;return!!(t.contains(n)||typeof e.intersectsNode==`function`&&(()=>{try{return e.intersectsNode(t)}catch{return!1}})())}function J(e,t){let n=e.cloneRange();return t.contains(e.startContainer)||n.setStart(t,0),t.contains(e.endContainer)||n.setEnd(t,t.childNodes.length),M(n,t,`markdown`).text}function Y({anchor:e,markdown:t,node:n,pointerStartedInNode:r}){if(n===null||typeof window>`u`)return null;let i=window.getSelection();if(i===null||i.rangeCount===0||i.isCollapsed)return null;let a=i.toString().trim();if(a.length===0)return null;let o=i.getRangeAt(0);if(!r&&!q(o,n))return null;let s=e??null,c=j(o)??(s===null?n.getBoundingClientRect():new DOMRect(s.point.x,s.point.y,0,0)),l={text:t?J(o,n):a,rect:c};return s!==null&&(l.anchorPoint=s.point,l.anchorSide=s.side),l}function X(e){let t=(0,H.c)(22),{children:n,markdown:r,onSelectionAddToChat:i}=e,a=r===void 0?!1:r,o=(0,U.useRef)(null),s=(0,U.useRef)(!1),c=(0,U.useRef)(null),l=(0,U.useRef)(!1),u=(0,U.useRef)(null),f=d(),[p,m]=(0,U.useState)(null),h=!f,g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{m(null)},t[0]=g):g=t[0];let _=g,v;t[1]===a?v=t[2]:(v=e=>{m(Y({anchor:e,markdown:a,node:o.current,pointerStartedInNode:s.current}))},t[1]=a,t[2]=v);let y=v,b,x;t[3]!==h||t[4]!==y?(b=()=>{if(!h||typeof window>`u`)return;let e=null,t=()=>{e!==null&&(window.cancelAnimationFrame(e),e=null)},n=n=>{let r=n===void 0?null:n;t(),e=window.requestAnimationFrame(()=>{e=null,y(r)})},r=e=>{t(),s.current=K(e,o.current),c.current=s.current?N(e):null,l.current=!0},i=e=>{let t=s.current&&c.current!==null?A(c.current,e):null;t!==null&&(u.current=t),l.current=!1,c.current=null,n(t??u.current)},a=()=>{l.current=!1,c.current=null,n(u.current)},d=()=>{l.current||n(u.current)};return document.addEventListener(`pointerdown`,r),document.addEventListener(`pointerup`,i),document.addEventListener(`pointercancel`,a),document.addEventListener(`mouseup`,i),document.addEventListener(`selectionchange`,d),document.addEventListener(`keyup`,d),()=>{t(),document.removeEventListener(`pointerdown`,r),document.removeEventListener(`pointerup`,i),document.removeEventListener(`pointercancel`,a),document.removeEventListener(`mouseup`,i),document.removeEventListener(`selectionchange`,d),document.removeEventListener(`keyup`,d)}},x=[h,y],t[3]=h,t[4]=y,t[5]=b,t[6]=x):(b=t[5],x=t[6]),(0,U.useEffect)(b,x);let S,C;t[7]===a?(S=t[8],C=t[9]):(S=()=>{if(!a)return;let e=e=>{let t=o.current,n=window.getSelection();if(e.defaultPrevented||e.clipboardData===null||t===null||n===null||n.isCollapsed||n.rangeCount!==1)return;let r=n.getRangeAt(0);if(!t.contains(r.startContainer)||!t.contains(r.endContainer))return;let i=M(r,t,`text`);i.text&&(e.clipboardData.setData(`text/plain`,i.text),e.clipboardData.setData(`text/html`,i.html),e.preventDefault())};return document.addEventListener(`copy`,e),()=>document.removeEventListener(`copy`,e)},C=[a],t[7]=a,t[8]=S,t[9]=C),(0,U.useEffect)(S,C);let w;t[10]===i?w=t[11]:(w=e=>{i?.(e),m(null)},t[10]=i,t[11]=w);let T=w,E;t[12]===n?E=t[13]:(E=(0,G.jsx)(`div`,{ref:o,className:`contents`,children:n}),t[12]=n,t[13]=E);let D;t[14]!==T||t[15]!==h||t[16]!==i||t[17]!==p?(D=h?(0,G.jsx)(P,{selection:p,onAddToChat:i===void 0?void 0:T,onDismiss:_}):null,t[14]=T,t[15]=h,t[16]=i,t[17]=p,t[18]=D):D=t[18];let O;return t[19]!==D||t[20]!==E?(O=(0,G.jsxs)(G.Fragment,{children:[E,D]}),t[19]=D,t[20]=E,t[21]=O):O=t[21],O}var Z=new Set([`avif`,`bmp`,`gif`,`ico`,`jpeg`,`jpg`,`png`,`webp`]),Q=(0,U.createContext)(null);function se(e){if(e.tab.kind!==`workspace-file-preview`&&e.tab.kind!==`host-file-preview`&&e.tab.kind!==`thread-storage-file-preview`&&e.tab.kind!==`attachment-file-preview`)return!1;let t=e.tab.path.split(`.`).pop()?.toLowerCase();return t!==void 0&&Z.has(t)}function ce(e){let t=(0,H.c)(33),{activeTabId:n,children:r,tabs:i}=e,[a,o]=(0,U.useState)(null),[s,c]=(0,U.useState)(!1),[l,u]=(0,U.useState)(le),d;t[0]===i?d=t[1]:(d=i.filter(se),t[0]=i,t[1]=d);let f=d,p;t[2]!==f||t[3]!==l?(p=e=>{let t=f[e];t!==void 0&&(o(l.get(t.tab.id)??null),t.onSelect())},t[2]=f,t[3]=l,t[4]=p):p=t[4];let m=p,h;t[5]!==n||t[6]!==f||t[7]!==m?(h=e=>{let t=f.findIndex(e=>e.tab.id===n);t===-1||f.length<=1||m(z({currentIndex:t,direction:e,itemCount:f.length}))},t[5]=n,t[6]=f,t[7]=m,t[8]=h):h=t[8];let g=h,_;t[9]===n?_=t[10]:(_=e=>{o(e),n!==null&&u(t=>t.get(n)?.src===e.src?t:new Map(t).set(n,e))},t[9]=n,t[10]=_);let v=_,y;t[11]===v?y=t[12]:(y=e=>{v(e),c(!0)},t[11]=v,t[12]=y);let b;t[13]!==s||t[14]!==y||t[15]!==v?(b={isOpen:s,open:y,update:v},t[13]=s,t[14]=y,t[15]=v,t[16]=b):b=t[16];let x=b,S=a?.alt??`Image preview`,C=s?a?.src??null:null,w=a?.alt??`Image preview`,T=f.length>1,E,D;t[17]===g?(E=t[18],D=t[19]):(E=()=>g(`previous`),D=()=>g(`next`),t[17]=g,t[18]=E,t[19]=D);let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>c(!1),t[20]=O):O=t[20];let k;t[21]!==s||t[22]!==T||t[23]!==E||t[24]!==D||t[25]!==S||t[26]!==C||t[27]!==w?(k=(0,G.jsx)(R,{imageAlt:S,imageSrc:C,isOpen:s,title:w,hasMultipleImages:T,onPrevious:E,onNext:D,onClose:O}),t[21]=s,t[22]=T,t[23]=E,t[24]=D,t[25]=S,t[26]=C,t[27]=w,t[28]=k):k=t[28];let A;return t[29]!==r||t[30]!==k||t[31]!==x?(A=(0,G.jsxs)(Q.Provider,{value:x,children:[r,k]}),t[29]=r,t[30]=k,t[31]=x,t[32]=A):A=t[32],A}function le(){return new Map}function ue(){return(0,U.useContext)(Q)}var de=t({FilePreview:()=>je,buildCsvPreviewData:()=>ke,getCsvTruncationNote:()=>Ae}),fe=100,pe=500,me=29,he=8,ge={width:`100%`,height:`100%`,border:0},_e=160,$=`h-5 w-5 rounded-sm p-0 [&_[data-icon-root]]:size-3 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9 max-md:pointer-coarse:[&_[data-icon-root]]:size-5`,ve=`h-5 rounded-sm px-2 text-muted-foreground max-md:pointer-coarse:h-9`;function ye(e){return e.kind===`html`?e.iframe.url:null}function be(e){return typeof window>`u`?e:new URL(e,window.location.href).toString()}function xe(e){return e.kind===`html`?`html`:e.kind===`ready`?e.textPreviewKind:null}function Se(e){switch(e){case`csv`:return`CSV view mode`;case`html`:return`HTML view mode`;case`markdown`:return`Markdown view mode`}}function Ce(e){return e===`csv`?`Copy CSV`:e===`markdown`?`Copy markdown`:e===`html`?`Copy HTML source`:`Copy file contents`}function we(e){return e.kind===`html`||e.kind===`ready`?e.lineRange:null}function Te(e){return e.kind===`html`||e.kind===`ready`?e.file.contents:null}function Ee({lineRange:e,toggleKind:t}){return t===`csv`||t===`html`||t===`markdown`||e===null?`preview`:`source`}function De(e,t){return e.kind===`html`?t===`source`:e.kind===`ready`?e.textPreviewKind===null||t===`source`:!1}function Oe(e,t){let n=[],r=[],i=``,a=!1,o=!1,s=!1;for(let c=0;c<e.length;c+=1){let l=e[c];if(s=!1,a){l===`"`?e[c+1]===`"`?(i+=`"`,c+=1):a=!1:i+=l;continue}if(l===`"`&&i.length===0){a=!0,o=!0;continue}if(l===`,`){r.push(i),i=``,o=!1;continue}if(l===`
|
|
2
2
|
`||l===`\r`){if(r.push(i),n.push(r),r=[],i=``,o=!1,s=!0,l===`\r`&&e[c+1]===`
|
|
3
3
|
`&&(c+=1),n.length>=t)return{rows:n,truncatedRows:c+1<e.length};continue}i+=l}return(i.length>0||r.length>0||o||!s)&&(r.push(i),n.push(r)),{rows:n,truncatedRows:!1}}function ke(e){let{rows:t,truncatedRows:n}=Oe(e,pe+1),r=t.reduce((e,t)=>Math.max(e,t.length),0);return{columnCount:Math.min(r,fe),rows:t,truncatedColumns:r>fe,truncatedRows:n}}function Ae(e,t){let n=[];return e.truncatedRows&&n.push(`${t.toLocaleString()} rows`),e.truncatedColumns&&n.push(`${e.columnCount.toLocaleString()} columns`),n.length===0?null:`Showing the first ${n.join(` and `)}.`}function je(e){let t=(0,H.c)(61),{download:n,state:r,path:i,copyPath:a,headerMode:o,onSelectionAddToChat:s,onOpenInEditor:l,onRefresh:u,isRefreshing:d,markdownLinkRouting:f,statusLabel:p}=e,m=n===void 0?null:n,h=a===void 0?null:a,g=o===void 0?`file`:o,_=d===void 0?!1:d,v=p===void 0?null:p,y=r.kind===`html`?r.iframe:null,b;t[0]!==y?.url||t[1]!==r.file||t[2]!==r.kind?(b=JSON.stringify([r.kind,y?.url,r.kind===`html`?r.file.cacheKey:null]),t[0]=y?.url,t[1]=r.file,t[2]=r.kind,t[3]=b):b=t[3];let x=b,S;t[4]===x?S=t[5]:(S={key:x,status:`loading`},t[4]=x,t[5]=S);let[C,w]=(0,U.useState)(S);C.key!==x&&w({key:x,status:`loading`});let T=C.key===x?C.status:`loading`,E;t[6]!==x||t[7]!==T||t[8]!==y?(E=y===null?null:(0,G.jsx)(Ve,{...y,loadState:T,onLoadStateChange:e=>w(t=>t.key===x?{key:x,status:e}:t)},x),t[6]=x,t[7]=T,t[8]=y,t[9]=E):E=t[9];let D=E,O,k,A,j,M,N;t[10]===r?(O=t[11],k=t[12],A=t[13],j=t[14],M=t[15],N=t[16]):(N=xe(r),k=we(r),A=Te(r),O=ye(r),M=U.useState,j=Ee({lineRange:k,toggleKind:N}),t[10]=r,t[11]=O,t[12]=k,t[13]=A,t[14]=j,t[15]=M,t[16]=N);let[P,F]=M(j),[I,te]=(0,U.useState)(ae),ne;t[17]!==k||t[18]!==N?(ne=()=>{F(Ee({lineRange:k,toggleKind:N}))},t[17]=k,t[18]=N,t[19]=ne):ne=t[19];let L;t[20]!==k||t[21]!==i||t[22]!==N?(L=[k,i,N],t[20]=k,t[21]=i,t[22]=N,t[23]=L):L=t[23],(0,U.useEffect)(ne,L);let re=r.kind===`html`&&P===`preview`,R=N===null?`preview`:P,z;t[24]!==R||t[25]!==r?(z=De(r,R),t[24]=R,t[25]=r,t[26]=z):z=t[26];let ie=z,B=ie,V=r.kind===`ready`&&r.textPreviewKind===`markdown`&&R===`preview`,oe=r.kind===`ready`&&r.textPreviewKind===`csv`&&R===`preview`,W=re||oe||ie||V,K;t[27]!==W||t[28]!==V?(K=W?c(`@container/page flex h-full min-h-0 flex-col`,V&&`overflow-y-auto`):`@container/page min-h-full`,t[27]=W,t[28]=V,t[29]=K):K=t[29];let q=V?``:void 0,J;t[30]!==h||t[31]!==m||t[32]!==O||t[33]!==g||t[34]!==T||t[35]!==_||t[36]!==I||t[37]!==l||t[38]!==u||t[39]!==i||t[40]!==A||t[41]!==B||t[42]!==r.kind||t[43]!==v||t[44]!==N||t[45]!==re||t[46]!==P?(J=g===`file`?(0,G.jsx)(Ne,{download:m,previewIcon:(0,G.jsx)(Be,{loading:r.kind===`loading`||_||re&&T===`loading`},i),path:i,copyPath:h,rawContents:A,externalUrl:O,onOpenInEditor:l,onRefresh:u,isRefreshing:_,statusLabel:v,toggleKind:N,showLineOverflowToggle:B,lineOverflowMode:I,onLineOverflowModeChange:te,viewMode:P,onViewModeChange:F}):null,t[30]=h,t[31]=m,t[32]=O,t[33]=g,t[34]=T,t[35]=_,t[36]=I,t[37]=l,t[38]=u,t[39]=i,t[40]=A,t[41]=B,t[42]=r.kind,t[43]=v,t[44]=N,t[45]=re,t[46]=P,t[47]=J):J=t[47];let Y;t[48]!==R||t[49]!==D||t[50]!==I||t[51]!==f||t[52]!==s||t[53]!==i||t[54]!==r?(Y=(0,G.jsx)(Me,{iframePreview:D,state:r,path:i,lineOverflowMode:I,viewMode:R,markdownLinkRouting:f,onSelectionAddToChat:s}),t[48]=R,t[49]=D,t[50]=I,t[51]=f,t[52]=s,t[53]=i,t[54]=r,t[55]=Y):Y=t[55];let X;return t[56]!==K||t[57]!==q||t[58]!==J||t[59]!==Y?(X=(0,G.jsxs)(`div`,{className:K,"data-file-preview-scroll-container":q,style:ee,children:[J,Y]}),t[56]=K,t[57]=q,t[58]=J,t[59]=Y,t[60]=X):X=t[60],X}function Me(e){let t=(0,H.c)(32),{iframePreview:n,state:r,path:i,lineOverflowMode:a,viewMode:o,markdownLinkRouting:s,onSelectionAddToChat:c}=e;if(r.kind===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(k,{}),t[0]=e):e=t[0],e}if(r.kind===`empty`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`Empty file.`}),t[1]=e):e=t[1],e}if(r.kind===`not-found`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ue,{message:`File not found.`,role:`alert`}),t[2]=e):e=t[2],e}if(r.kind===`error`){let e=r.message??`Failed to load file`,n;return t[3]===e?n=t[4]:(n=(0,G.jsx)(Ue,{message:e,role:`alert`}),t[3]=e,t[4]=n),n}if(r.kind===`unsupported`){let e;return t[5]===r.file?e=t[6]:(e=(0,G.jsx)(He,{file:r.file}),t[5]=r.file,t[6]=e),e}if(r.kind===`image`){let e;return t[7]!==i||t[8]!==r.url?(e=(0,G.jsx)(Re,{url:r.url,alt:i}),t[7]=i,t[8]=r.url,t[9]=e):e=t[9],e}if(r.kind===`video`){let e;return t[10]!==i||t[11]!==r.url?(e=(0,G.jsx)(ze,{url:r.url,title:i}),t[10]=i,t[11]=r.url,t[12]=e):e=t[12],e}if(r.kind===`html`){let e;return t[13]!==n||t[14]!==a||t[15]!==c||t[16]!==r||t[17]!==o?(e=(0,G.jsx)(Fe,{iframePreview:n,lineOverflowMode:a,onSelectionAddToChat:c,state:r,viewMode:o}),t[13]=n,t[14]=a,t[15]=c,t[16]=r,t[17]=o,t[18]=e):e=t[18],e}if(r.textPreviewKind===`csv`&&o===`preview`){let e;return t[19]!==c||t[20]!==r.file?(e=(0,G.jsx)(Le,{file:r.file,onSelectionAddToChat:c}),t[19]=c,t[20]=r.file,t[21]=e):e=t[21],e}if(r.textPreviewKind===`markdown`&&o===`preview`){let e;return t[22]!==s||t[23]!==c||t[24]!==r.file?(e=(0,G.jsx)(Ie,{file:r.file,markdownLinkRouting:s,onSelectionAddToChat:c}),t[22]=s,t[23]=c,t[24]=r.file,t[25]=e):e=t[25],e}let l=r.lineRange??null,u;return t[26]!==a||t[27]!==c||t[28]!==i||t[29]!==r.file||t[30]!==l?(u=(0,G.jsx)(We,{file:r.file,lineOverflowMode:a,lineRange:l,onSelectionAddToChat:c,path:i}),t[26]=a,t[27]=c,t[28]=i,t[29]=r.file,t[30]=l,t[31]=u):u=t[31],u}function Ne(e){let t=(0,H.c)(45),{download:n,previewIcon:r,path:i,copyPath:u,rawContents:d,externalUrl:h,onOpenInEditor:C,onRefresh:k,isRefreshing:A,statusLabel:j,toggleKind:M,showLineOverflowToggle:N,lineOverflowMode:P,onLineOverflowModeChange:F,viewMode:ee,onViewModeChange:R}=e,z=D(`workspace.openPreferred`),{ref:ae,width:B}=ne(),V=s(),U=B>0?B<560:V,W=N||M!==null,K;t[0]===M?K=t[1]:(K=Ce(M),t[0]=M,t[1]=K);let q=K,J;t[2]!==u||t[3]!==i?(J=(0,G.jsx)(I,{path:i,copyPath:u}),t[2]=u,t[3]=i,t[4]=J):J=t[4];let Y;t[5]===j?Y=t[6]:(Y=j===null?null:(0,G.jsxs)(`span`,{className:c(`shrink-0 leading-5 text-muted-foreground`,O),children:[`(`,j,`)`]}),t[5]=j,t[6]=Y);let X;t[7]!==q||t[8]!==n||t[9]!==h||t[10]!==U||t[11]!==A||t[12]!==C||t[13]!==k||t[14]!==z||t[15]!==i||t[16]!==d?(X=U?null:(0,G.jsxs)(T,{delayDuration:300,children:[k?(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`icon`,className:c($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:k,disabled:A,"aria-label":A?`Refreshing file`:`Refresh file`,children:(0,G.jsx)(o,{name:`RotateCcw`,"aria-hidden":!0})})}),(0,G.jsx)(g,{side:`bottom`,children:A?`Refreshing file`:`Refresh file`})]}):null,n===null?null:(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`icon`,className:$,onClick:()=>void L(n),"aria-label":`Download`,children:(0,G.jsx)(o,{name:`Download`,"aria-hidden":!0})})}),(0,G.jsx)(g,{side:`bottom`,children:`Download`})]}),d===null?null:(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(f,{text:d,label:q,className:c($,`shrink-0 rounded-md hover:bg-state-hover hover:text-foreground`)})}),(0,G.jsx)(g,{side:`bottom`,children:q})]}),h===null?null:(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`icon`,className:c($,`shrink-0 text-muted-foreground hover:bg-state-hover hover:text-foreground`),onClick:()=>{v(be(h))},"aria-label":`Open in external browser`,children:(0,G.jsx)(o,{name:`Globe`,"aria-hidden":!0})})}),(0,G.jsx)(g,{side:`bottom`,children:`Open in external browser`})]}),C?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(a,{children:[(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(oe,{onClick:()=>C(i),className:$,label:z?`Open in editor (${z.label})`:`Open in editor`,"aria-keyshortcuts":z?.ariaKeyshortcuts})}),(0,G.jsx)(g,{side:`bottom`,children:z?`Open in editor (${z.label})`:`Open in editor`})]}),(0,G.jsx)(re,{shortcut:z})]}):null]}),t[7]=q,t[8]=n,t[9]=h,t[10]=U,t[11]=A,t[12]=C,t[13]=k,t[14]=z,t[15]=i,t[16]=d,t[17]=X):X=t[17];let Z;t[18]!==r||t[19]!==J||t[20]!==Y||t[21]!==X?(Z=(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1.5`,children:[r,J,Y,X]}),t[18]=r,t[19]=J,t[20]=Y,t[21]=X,t[22]=Z):Z=t[22];let Q;t[23]!==q||t[24]!==u||t[25]!==n||t[26]!==h||t[27]!==U||t[28]!==A||t[29]!==P||t[30]!==F||t[31]!==C||t[32]!==k||t[33]!==R||t[34]!==i||t[35]!==d||t[36]!==W||t[37]!==N||t[38]!==M||t[39]!==ee?(Q=W||U?(0,G.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[(0,G.jsx)(Pe,{showLineOverflowToggle:N&&!U,lineOverflowMode:P,onLineOverflowModeChange:F}),M===null?null:(0,G.jsxs)(`div`,{className:`inline-flex shrink-0 items-center gap-0.5 rounded-md border border-border p-0.5`,role:`tablist`,"aria-label":Se(M),children:[(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`sm`,className:c(ve,O),onClick:()=>R(`preview`),"aria-pressed":ee===`preview`,children:`Preview`}),(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`sm`,className:c(ve,O),onClick:()=>R(`source`),"aria-pressed":ee===`source`,children:`Raw`})]}),U?(0,G.jsxs)(p,{modal:!1,children:[(0,G.jsx)(_,{asChild:!0,children:(0,G.jsx)(y,{variant:`ghost`,size:`icon`,className:c($,`shrink-0 max-md:pointer-coarse:size-10`),"aria-label":`File actions`,children:(0,G.jsx)(o,{name:`MoreHorizontal`,"aria-hidden":!0})})}),(0,G.jsxs)(w,{align:`end`,mobileTitle:`File actions`,className:`max-md:pointer-coarse:[&_[role=menuitem]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitem]]:text-sm max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:min-h-11 max-md:pointer-coarse:[&_[role=menuitemcheckbox]]:text-sm`,children:[(0,G.jsx)(E,{className:`max-w-80 break-all font-mono`,children:i}),(0,G.jsx)(m,{}),(0,G.jsxs)(b,{onSelect:()=>{l(u??i,{successMessage:`File path copied`,errorMessage:`Failed to copy file path`})},children:[(0,G.jsx)(o,{name:`Copy`,"aria-hidden":!0}),` Copy file path`]}),d===null?null:(0,G.jsxs)(b,{onSelect:()=>{l(d,{successMessage:`Copied to clipboard`,errorMessage:`Failed to copy file contents`})},children:[(0,G.jsx)(o,{name:`Copy`,"aria-hidden":!0}),` `,q]}),n===null?null:(0,G.jsxs)(b,{onSelect:()=>void L(n),children:[(0,G.jsx)(o,{name:`Download`,"aria-hidden":!0}),` Download`]}),k?(0,G.jsxs)(b,{disabled:A,onSelect:k,children:[(0,G.jsx)(o,{name:`RotateCcw`,"aria-hidden":!0}),` `,A?`Refreshing file`:`Refresh file`]}):null,h===null?null:(0,G.jsxs)(b,{onSelect:()=>v(be(h)),children:[(0,G.jsx)(o,{name:`Globe`,"aria-hidden":!0}),` Open in external browser`]}),C?(0,G.jsxs)(b,{onSelect:()=>C(i),children:[(0,G.jsx)(o,{name:`ExternalLink`,"aria-hidden":!0}),` Open in editor`]}):null,N?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(m,{}),(0,G.jsxs)(S,{className:`gap-2 [&>[data-icon-root]]:size-4 [&>[data-icon-root]]:shrink-0`,checked:P===`wrap`,onCheckedChange:e=>F(e?`wrap`:`scroll`),children:[(0,G.jsx)(o,{name:`TextWrap`,"aria-hidden":!0}),ie]})]}):null]})]}):null]}):null,t[23]=q,t[24]=u,t[25]=n,t[26]=h,t[27]=U,t[28]=A,t[29]=P,t[30]=F,t[31]=C,t[32]=k,t[33]=R,t[34]=i,t[35]=d,t[36]=W,t[37]=N,t[38]=M,t[39]=ee,t[40]=Q):Q=t[40];let se;return t[41]!==ae||t[42]!==Z||t[43]!==Q?(se=(0,G.jsxs)(te,{headerRef:ae,children:[Z,Q]}),t[41]=ae,t[42]=Z,t[43]=Q,t[44]=se):se=t[44],se}function Pe(e){let t=(0,H.c)(11),{showLineOverflowToggle:n,lineOverflowMode:r,onLineOverflowModeChange:i}=e;if(!n)return null;let s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=c($,`text-muted-foreground`),t[0]=s):s=t[0];let l=r===`wrap`,u;t[1]!==r||t[2]!==i?(u=()=>{i(r===`wrap`?`scroll`:`wrap`)},t[1]=r,t[2]=i,t[3]=u):u=t[3];let d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,G.jsx)(o,{name:`TextWrap`}),t[4]=d):d=t[4];let f;t[5]!==l||t[6]!==u?(f=(0,G.jsx)(x,{asChild:!0,children:(0,G.jsx)(y,{type:`button`,variant:`ghost`,size:`icon`,className:s,"aria-label":ie,"aria-pressed":l,onClick:u,children:d})}),t[5]=l,t[6]=u,t[7]=f):f=t[7];let p;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,G.jsx)(g,{side:`bottom`,children:ie}),t[8]=p):p=t[8];let m;return t[9]===f?m=t[10]:(m=(0,G.jsx)(T,{delayDuration:300,children:(0,G.jsxs)(a,{children:[f,p]})}),t[9]=f,t[10]=m),m}function Fe(e){let t=(0,H.c)(16),{iframePreview:n,lineOverflowMode:r,onSelectionAddToChat:i,state:a,viewMode:o}=e,s=o===`preview`,c=s?`contents`:`hidden`,l=s?void 0:!0,u;t[0]!==n||t[1]!==c||t[2]!==l?(u=(0,G.jsx)(`div`,{className:c,"aria-hidden":l,children:n}),t[0]=n,t[1]=c,t[2]=l,t[3]=u):u=t[3];let d=s?`hidden`:`contents`,f=s?!0:void 0,p;t[4]!==r||t[5]!==i||t[6]!==a.file||t[7]!==a.lineRange?(p=(0,G.jsx)(We,{file:a.file,lineOverflowMode:r,lineRange:a.lineRange,onSelectionAddToChat:i,path:a.file.name}),t[4]=r,t[5]=i,t[6]=a.file,t[7]=a.lineRange,t[8]=p):p=t[8];let m;t[9]!==d||t[10]!==f||t[11]!==p?(m=(0,G.jsx)(`div`,{className:d,"aria-hidden":f,children:p}),t[9]=d,t[10]=f,t[11]=p,t[12]=m):m=t[12];let h;return t[13]!==u||t[14]!==m?(h=(0,G.jsxs)(G.Fragment,{children:[u,m]}),t[13]=u,t[14]=m,t[15]=h):h=t[15],h}function Ie(e){let t=(0,H.c)(12),{file:n,onSelectionAddToChat:r,markdownLinkRouting:i}=e,a=(0,U.useRef)(null),o=(0,U.useContext)(W),s;t[0]===o?s=t[1]:(s=()=>{let e=a.current?.closest(`[data-file-preview-scroll-container]`);if(!e||!o)return;e.scrollTop=o.scrollTop;let t=()=>{o.scrollTop=e.scrollTop};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},t[0]=o,t[1]=s);let c;t[2]!==n.contents||t[3]!==n.name||t[4]!==o?(c=[o,n.name,n.contents],t[2]=n.contents,t[3]=n.name,t[4]=o,t[5]=c):c=t[5],(0,U.useLayoutEffect)(s,c);let l;t[6]!==n.contents||t[7]!==i?(l=(0,G.jsx)(`div`,{ref:a,className:`flex-auto bg-background px-4 py-4`,children:(0,G.jsx)(B,{allowHtml:!0,content:n.contents,linkRouting:i})}),t[6]=n.contents,t[7]=i,t[8]=l):l=t[8];let u;return t[9]!==r||t[10]!==l?(u=(0,G.jsx)(X,{markdown:!0,onSelectionAddToChat:r,children:l}),t[9]=r,t[10]=l,t[11]=u):u=t[11],u}function Le({file:e,onSelectionAddToChat:t}){let n=(0,U.useMemo)(()=>ke(e.contents),[e.contents]),r=n.rows[0]??[],i=n.rows.slice(1),a=Array.from({length:n.columnCount},(e,t)=>({index:t,label:r[t]??``})),o=`max(100%, ${3+a.length*18}rem)`,s=Ae(n,i.length),c=(0,U.useRef)(null),l=F({count:i.length,getScrollElement:()=>c.current,estimateSize:()=>me,overscan:he}),u=l.getVirtualItems(),d=l.getTotalSize(),f=u[0],p=u[u.length-1],m=f?.start??0,h=p===void 0?d:d-p.end;return(0,G.jsx)(X,{onSelectionAddToChat:t,children:(0,G.jsxs)(`div`,{className:`flex min-h-0 flex-auto flex-col bg-surface-raised px-4 py-4`,children:[(0,G.jsx)(`div`,{ref:c,className:`persistent-scrollbar min-h-0 overflow-auto overscroll-contain rounded-md border border-border bg-background`,children:(0,G.jsxs)(`table`,{className:`min-w-full table-fixed border-separate border-spacing-0 font-mono text-xs leading-5`,"aria-label":`${e.name} CSV preview`,style:{width:o},children:[(0,G.jsxs)(`colgroup`,{children:[(0,G.jsx)(`col`,{className:`w-12`}),a.map(e=>(0,G.jsx)(`col`,{className:`w-72`},e.index))]}),(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{children:[(0,G.jsx)(`th`,{scope:`col`,className:`sticky left-0 top-0 z-30 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:`#`}),a.map(e=>(0,G.jsx)(`th`,{scope:`col`,className:`sticky top-0 z-20 w-72 max-w-72 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-left font-medium text-foreground`,title:e.label,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:e.label||`Column ${e.index+1}`})},e.index))]})}),(0,G.jsxs)(`tbody`,{children:[m>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:m},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null,u.map(e=>{let t=e.index,n=i[t]??[];return(0,G.jsxs)(`tr`,{"data-index":t,ref:l.measureElement,children:[(0,G.jsx)(`th`,{scope:`row`,className:`sticky left-0 z-10 w-12 min-w-12 border-b border-r border-border bg-surface-recessed-solid px-2 py-1 text-right font-medium text-muted-foreground`,children:t+2}),a.map(e=>{let t=n[e.index]??``;return(0,G.jsx)(`td`,{className:`w-72 max-w-72 overflow-hidden border-b border-r border-border px-2 py-1 align-top text-foreground`,title:t,children:(0,G.jsx)(`span`,{className:`block max-w-full truncate`,children:t})},e.index)})]},e.key)}),h>0?(0,G.jsx)(`tr`,{"aria-hidden":!0,style:{height:h},children:(0,G.jsx)(`td`,{colSpan:a.length+1,className:`p-0`})}):null]})]})}),s===null?null:(0,G.jsx)(`p`,{className:`mt-2 shrink-0 text-xs leading-5 text-muted-foreground`,children:s})]})})}function Re(e){let t=(0,H.c)(24),{url:n,alt:r}=e,[i,a]=(0,U.useState)(!1),o=ue(),s,c;t[0]!==r||t[1]!==o||t[2]!==n?(s=()=>{o?.isOpen&&o.update({alt:r,src:n})},c=[r,o,n],t[0]=r,t[1]=o,t[2]=n,t[3]=s,t[4]=c):(s=t[3],c=t[4]),(0,U.useLayoutEffect)(s,c);let l=`Open ${r} in full screen preview`,u;t[5]!==r||t[6]!==o||t[7]!==n?(u=()=>{if(o){o.open({alt:r,src:n});return}a(!0)},t[5]=r,t[6]=o,t[7]=n,t[8]=u):u=t[8];let d;t[9]!==r||t[10]!==n?(d=(0,G.jsx)(`img`,{src:n,alt:r,className:`mx-auto block h-auto max-w-full`}),t[9]=r,t[10]=n,t[11]=d):d=t[11];let f;t[12]!==l||t[13]!==u||t[14]!==d?(f=(0,G.jsx)(`button`,{type:`button`,className:`block w-full cursor-zoom-in`,"aria-label":l,onClick:u,children:d}),t[12]=l,t[13]=u,t[14]=d,t[15]=f):f=t[15];let p;t[16]!==r||t[17]!==o||t[18]!==i||t[19]!==n?(p=o===null?(0,G.jsx)(R,{title:r,imageSrc:i?n:null,imageAlt:r,onClose:()=>a(!1)}):null,t[16]=r,t[17]=o,t[18]=i,t[19]=n,t[20]=p):p=t[20];let m;return t[21]!==f||t[22]!==p?(m=(0,G.jsxs)(`div`,{className:`pt-4`,children:[f,p]}),t[21]=f,t[22]=p,t[23]=m):m=t[23],m}function ze(e){let t=(0,H.c)(3),{url:n,title:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,G.jsx)(`div`,{className:`pt-4`,children:(0,G.jsx)(`video`,{src:n,title:r,className:`block max-h-[34rem] w-full bg-black`,controls:!0,preload:`metadata`})}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i}function Be(e){let t=(0,H.c)(14),{loading:n}=e,[r,i]=(0,U.useState)(!1),a,s;t[0]===n?(a=t[1],s=t[2]):(a=()=>{if(!n){i(!1);return}let e=window.setTimeout(()=>i(!0),_e);return()=>window.clearTimeout(e)},s=[n],t[0]=n,t[1]=a,t[2]=s),(0,U.useEffect)(a,s);let l=n&&r,u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=c(`flex items-center justify-center text-subtle-foreground`,h),t[3]=u):u=t[3];let d=l?`Spinner`:`File`,f=l&&`animate-spin motion-reduce:animate-none`,p;t[4]===f?p=t[5]:(p=c(`size-full`,f),t[4]=f,t[5]=p);let m;t[6]!==d||t[7]!==p?(m=(0,G.jsx)(o,{name:d,className:p,"aria-hidden":!0}),t[6]=d,t[7]=p,t[8]=m):m=t[8];let g;t[9]===l?g=t[10]:(g=l?(0,G.jsx)(`span`,{role:`status`,className:`sr-only`,children:`Loading preview…`}):null,t[9]=l,t[10]=g);let _;return t[11]!==m||t[12]!==g?(_=(0,G.jsxs)(`span`,{className:u,children:[m,g]}),t[11]=m,t[12]=g,t[13]=_):_=t[13],_}function Ve(e){let t=(0,H.c)(10),{sandbox:n,title:r,url:i,loadState:a,onLoadStateChange:o}=e;if(a===`error`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(Ue,{message:`Failed to load HTML preview.`,role:`alert`})}),t[0]=e):e=t[0],e}let s,c;t[1]===o?(s=t[2],c=t[3]):(s=()=>o(`loaded`),c=()=>o(`error`),t[1]=o,t[2]=s,t[3]=c);let l;return t[4]!==n||t[5]!==s||t[6]!==c||t[7]!==r||t[8]!==i?(l=(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden`,children:(0,G.jsx)(`iframe`,{title:r,src:i,sandbox:n,style:ge,onLoad:s,onError:c})}),t[4]=n,t[5]=s,t[6]=c,t[7]=r,t[8]=i,t[9]=l):l=t[9],l}function He(e){let t=(0,H.c)(24),{file:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-lg bg-surface-raised text-muted-foreground`,children:(0,G.jsx)(o,{name:`File`,className:`size-6`,"aria-hidden":!0})}),t[0]=r):r=t[0];let i;t[1]===n.name?i=t[2]:(i=(0,G.jsx)(`p`,{className:`truncate text-sm font-medium text-foreground`,children:n.name}),t[1]=n.name,t[2]=i);let a=n.mimeType,s;t[3]===n.sizeBytes?s=t[4]:(s=u(n.sizeBytes),t[3]=n.sizeBytes,t[4]=s);let c=`${a} · ${s}`,l;t[5]===c?l=t[6]:(l=(0,G.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:c}),t[5]=c,t[6]=l);let d;t[7]!==i||t[8]!==l?(d=(0,G.jsxs)(`div`,{className:`flex max-w-full min-w-0 flex-col gap-1`,children:[i,l]}),t[7]=i,t[8]=l,t[9]=d):d=t[9];let f=n.reason===`too-large`?`This file is too large to preview.`:`This file type can't be previewed.`,p;t[10]===f?p=t[11]:(p=(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:f}),t[10]=f,t[11]=p);let m;t[12]!==n.name||t[13]!==n.url?(m=e=>{e.preventDefault(),L({url:n.url,fileName:n.name})},t[12]=n.name,t[13]=n.url,t[14]=m):m=t[14];let h;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,G.jsx)(o,{name:`Download`,"aria-hidden":!0}),t[15]=h):h=t[15];let g;t[16]!==n.name||t[17]!==n.url||t[18]!==m?(g=(0,G.jsx)(y,{asChild:!0,variant:`outline`,size:`sm`,children:(0,G.jsxs)(`a`,{href:n.url,download:n.name,onClick:m,children:[h,`Download`]})}),t[16]=n.name,t[17]=n.url,t[18]=m,t[19]=g):g=t[19];let _;return t[20]!==g||t[21]!==d||t[22]!==p?(_=(0,G.jsxs)(`div`,{className:`flex flex-col items-center gap-4 px-6 py-12 text-center`,children:[r,d,p,g]}),t[20]=g,t[21]=d,t[22]=p,t[23]=_):_=t[23],_}function Ue(e){let t=(0,H.c)(3),{message:n,role:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,G.jsx)(C,{role:r,className:`mx-4 mt-4 rounded-lg`,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function We(e){let t=(0,H.c)(9),{file:n,lineOverflowMode:r,lineRange:i,onSelectionAddToChat:a,path:o}=e,s;t[0]===i?s=t[1]:(s=i===null?null:{start:i.startLineNumber,end:i.endLineNumber},t[0]=i,t[1]=s);let c=s,l=n.cacheKey??n.name,u;return t[2]!==n.contents||t[3]!==c||t[4]!==r||t[5]!==a||t[6]!==o||t[7]!==l?(u=(0,G.jsx)(V,{content:n.contents,path:o,cacheKey:l,overflow:r,highlightedLines:c,scrollToHighlightedLines:!0,onSelectionAddToChat:a}),t[2]=n.contents,t[3]=c,t[4]=r,t[5]=a,t[6]=o,t[7]=l,t[8]=u):u=t[8],u}export{W as i,de as n,ce as r,je as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dh as i,Fh as a,Pn as o,Sc as s,Zt as c,jh as l}from"./index-CfvM6UcU.js";import{t as u}from"./code-loading-skeletons-pfQDO26Y.js";import{f as d,l as f,o as p,u as m}from"./git-diff-patch-text-SHpUxhZL.js";import{t as h}from"./truncate-start-CGyRoGtG.js";import{n as g,r as _,t as v}from"./image-lightbox-Dhmri6WK.js";import{a as y}from"./absolute-file-path-CbI5cppS.js";import{n as b}from"./diff-stats-tally-DkIHmiEl.js";import{t as x}from"./open-in-editor-button-D0wnpT6x.js";import{n as S,t as C}from"./file-path-link-Ddg7Fzor.js";import{t as w}from"./DiffHost-DYBSO1_c.js";var T=n(),E=e(t(),1),D=e(r(),1),O={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`};function k(e){return e===`modified`||e===`renamed`||e===`copied`}function ee(e){if(typeof window.requestIdleCallback==`function`){let t=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(t)}let t=window.setTimeout(e,200);return()=>window.clearTimeout(t)}function A(e,t,n){let r=d(e.name)??e.name,i=d(e.prevName)??r,a=t===`added`?{kind:`empty`,path:r}:{kind:`request`,path:t===`renamed`?i:r,side:`old`},o=t===`deleted`?{kind:`empty`,path:r}:{kind:`request`,path:r,side:`new`},s=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,j(a),j(o),s,n??``,e.deletionLines.join(``),e.additionLines.join(``)].join(`:`),old:a,new:o}}function j(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function te(e,t){return e.kind===`empty`?Promise.resolve({kind:`text`,file:{name:e.path,contents:``}}):t(e.path,e.side)}function M(e,t){return{old:{path:e.name,content:e.contents},new:{path:t.name,content:t.contents}}}function N(e,t){return e.hunks.length===0&&e.type!==`rename-pure`&&t!==void 0&&f(e.name)}function P(e,t){return e.type!==`rename-pure`&&t!==void 0&&m(e)}function F(e){let t=e.trim();return t.length===0?null:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function I(e){let t=(0,T.c)(75),{fileDiff:n,changeKind:r,onRequestFileContents:i,patchText:a,renderBeforeVisible:o}=e,c=r===`deleted`,l;t[0]!==n||t[1]!==i?(l=N(n,i),t[0]=n,t[1]=i,t[2]=l):l=t[2];let u=l,d;t[3]!==n||t[4]!==i?(d=P(n,i),t[3]=n,t[4]=i,t[5]=d):d=t[5];let f=d,m;t[6]===n?m=t[7]:(m=p(n),t[6]=n,t[7]=m);let h=m,g;t[8]!==r||t[9]!==n||t[10]!==a?(g=A(n,r,a),t[8]=r,t[9]=n,t[10]=a,t[11]=g):g=t[11];let _=g,v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v={initialIsIntersecting:!1,rootMargin:`200px`},t[12]=v):v=t[12];let{ref:y,isIntersecting:b}=S(v),x=(0,E.useRef)(i),C;t[13]===i?C=t[14]:(C=()=>{x.current=i},t[13]=i,t[14]=C),(0,E.useEffect)(C);let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w={status:`idle`},t[15]=w):w=t[15];let[D,O]=(0,E.useState)(w),j=(0,E.useRef)(`idle`),[I,z]=(0,E.useState)(o),[B,V]=(0,E.useState)(!1),[U,W]=(0,E.useState)(0),[G,re]=(0,E.useState)(!1),K=s(),q;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(q=()=>{j.current=`idle`,O({status:`idle`}),V(!1),W(0),re(!1)},t[16]=q):q=t[16];let J;t[17]!==_.identity||t[18]!==u||t[19]!==f?(J=[_.identity,u,f],t[17]=_.identity,t[18]=u,t[19]=f,t[20]=J):J=t[20],(0,E.useEffect)(q,J);let Y,X;t[21]===b?(Y=t[22],X=t[23]):(Y=()=>{b&&z(!0)},X=[b],t[21]=b,t[22]=Y,t[23]=X),(0,E.useEffect)(Y,X);let ie=c&&!u&&!f&&!B,Z=I&&!ie,ae=u||f,oe;t[24]!==r||t[25]!==n||t[26]!==ae||t[27]!==i||t[28]!==a?(oe=!ae&&i!==void 0&&a!==void 0&&n.hunks.length>0&&k(r),t[24]=r,t[25]=n,t[26]=ae,t[27]=i,t[28]=a,t[29]=oe):oe=t[29];let Q=oe,$=Z&&(ae||Q&&U>0),se,ce;t[30]!==Q||t[31]!==U||t[32]!==K||t[33]!==Z?(se=()=>{if(!(K||!Z||!Q||U>0))return ee(()=>{W(L)})},ce=[Q,U,K,Z],t[30]=Q,t[31]=U,t[32]=K,t[33]=Z,t[34]=se,t[35]=ce):(se=t[34],ce=t[35]),(0,E.useEffect)(se,ce);let le;t[36]!==_.new||t[37]!==_.old||t[38]!==f||t[39]!==$?(le=()=>{if(!$||j.current!==`idle`)return;let e=x.current;if(!e)return;let t=!1;return j.current=`loading`,O({status:`loading`}),Promise.all([te(_.old,e),te(_.new,e)]).then(e=>{let[n,r]=e;if(t)return;let i=n?.kind===`image`?n:null,a=r?.kind===`image`?r:null;if(i!==null||a!==null){j.current=`ready-image`,O({status:`ready-image`,oldImageUrl:i?.dataUrl??null,newImageUrl:a?.dataUrl??null,oldSizeBytes:i?.sizeBytes??null,newSizeBytes:a?.sizeBytes??null});return}if(n?.kind!==`text`||r?.kind!==`text`){j.current=`unavailable`,O({status:`unavailable`});return}let o=M(n.file,r.file);if(f){j.current=`ready-svg`,O({status:`ready-svg`,fullFileContents:o,oldImageUrl:F(n.file.contents),newImageUrl:F(r.file.contents)});return}j.current=`ready`,O({status:`ready`,fullFileContents:o})}).catch(()=>{t||(j.current=`error`,O({status:`error`}))}),()=>{t=!0,j.current===`loading`&&(j.current=`idle`)}},t[36]=_.new,t[37]=_.old,t[38]=f,t[39]=$,t[40]=le):le=t[40];let ue;t[41]!==U||t[42]!==_||t[43]!==n||t[44]!==f||t[45]!==a||t[46]!==$?(ue=[U,_,n,f,a,$],t[41]=U,t[42]=_,t[43]=n,t[44]=f,t[45]=a,t[46]=$,t[47]=ue):ue=t[47],(0,E.useEffect)(le,ue);let de;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>{j.current===`error`&&(j.current=`idle`,O({status:`idle`})),re(!0),W(ne)},t[48]=de):de=t[48];let fe=de,pe=U>0,me=!K,he;t[49]!==Q||t[50]!==D.status||t[51]!==G||t[52]!==pe||t[53]!==me?(he=R({canExpandContext:Q,contextRequested:pe,enrichmentStatus:D.status,isPrefetchedAutomatically:me,isRequestedByUser:G}),t[49]=Q,t[50]=D.status,t[51]=G,t[52]=pe,t[53]=me,t[54]=he):he=t[54];let ge=he,_e;t[55]===ge?_e=t[56]:(_e={status:ge,request:fe},t[55]=ge,t[56]=_e);let ve=_e,ye=D.status===`ready`||D.status===`ready-svg`?D.fullFileContents:null,be;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(be=()=>{V(!0),z(!0)},t[57]=be):be=t[57];let xe=be,Se;t[58]!==r||t[59]!==D||t[60]!==u?(Se=u&&D.status===`ready-image`?H(D,r):null,t[58]=r,t[59]=D,t[60]=u,t[61]=Se):Se=t[61];let Ce=Se,we;return t[62]!==y||t[63]!==ve||t[64]!==D||t[65]!==n||t[66]!==h||t[67]!==ye||t[68]!==Ce||t[69]!==u||t[70]!==f||t[71]!==a||t[72]!==ie||t[73]!==Z?(we={bodySentinelRef:y,enrichment:D,fileDiff:n,fileDiffLabel:h,isImageCard:u,isSvgPreviewCard:f,shouldGateDeletedDiff:ie,shouldRenderDiffView:Z,loadDeletedDiff:xe,imageSizeStat:Ce,contextExpansion:ve,fullFileContents:ye,patchText:a},t[62]=y,t[63]=ve,t[64]=D,t[65]=n,t[66]=h,t[67]=ye,t[68]=Ce,t[69]=u,t[70]=f,t[71]=a,t[72]=ie,t[73]=Z,t[74]=we):we=t[74],we}function ne(e){return e+1}function L(e){return e===0?1:e}function R({canExpandContext:e,contextRequested:t,enrichmentStatus:n,isPrefetchedAutomatically:r,isRequestedByUser:i}){if(!e)return`unavailable`;let a=i?`loading`:`prefetching`;switch(n){case`idle`:return t?a:r?`prefetching`:`idle`;case`loading`:return a;case`ready`:return`ready`;case`error`:return`error`;case`ready-image`:case`ready-svg`:case`unavailable`:return`unavailable`;default:return n}}function z(e,t){let n=e!==null&&t!==null,r=[];return e!==null&&r.push({url:e,caption:n?`Old`:null}),t!==null&&r.push({url:t,caption:n?`New`:null}),r}function B(e,t){return t.caption===null?e:`${e} (${t.caption.toLowerCase()})`}function V(e){return e.status!==`ready-image`&&e.status!==`ready-svg`?null:{oldImageUrl:e.oldImageUrl,newImageUrl:e.newImageUrl}}function H(e,t){let n=t===`deleted`?null:e.newSizeBytes,r=t===`added`?null:e.oldSizeBytes;return n===null&&r===null?null:{addedBytes:n,removedBytes:r}}function U(e){let t=(0,T.c)(32),{preview:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i,[o,s]=(0,E.useState)(null),c,l,u,d,f,p,m,h;if(t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n.newImageUrl||t[4]!==n.oldImageUrl){h=Symbol.for(`react.early_return_sentinel`);bb0:{if(l=z(n.oldImageUrl,n.newImageUrl),l.length===0){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[13]=e):e=t[13],h=e;break bb0}let e=o===null?void 0:l[o];u=e=>{s(t=>t===null?null:_({currentIndex:t,direction:e,itemCount:l.length}))};let i;t[14]!==r||t[15]!==a?(i=(e,t)=>(0,D.jsxs)(`figure`,{className:`min-w-0 max-w-full`,children:[(0,D.jsx)(`button`,{type:`button`,className:a?`flex h-64 w-full cursor-zoom-in items-center justify-center rounded-md border border-border bg-surface-recessed p-3`:`block max-w-full cursor-zoom-in`,onClick:()=>s(t),children:(0,D.jsx)(`img`,{src:e.url,alt:B(r,e),style:v,className:a?`block h-full w-full object-contain`:`block max-h-80 max-w-full rounded-md border border-border object-contain`})}),e.caption===null?null:(0,D.jsx)(`figcaption`,{className:`mt-1 text-xs text-muted-foreground`,children:e.caption})]},e.url),t[14]=r,t[15]=a,t[16]=i):i=t[16],m=(0,D.jsx)(`div`,{className:`@container/diff-preview min-w-0`,children:(0,D.jsx)(`div`,{className:a?l.length>1?`grid grid-cols-1 gap-3 px-3 py-3 @min-[32rem]/diff-preview:grid-cols-2`:`grid grid-cols-1 gap-3 px-3 py-3`:`flex flex-col items-start gap-3 px-3 py-3 @min-[32rem]/diff-preview:flex-row`,children:l.map(i)})}),c=g,d=`${r} image preview`,f=e?.url??null,p=e?B(r,e):r}t[0]=o,t[1]=r,t[2]=a,t[3]=n.newImageUrl,t[4]=n.oldImageUrl,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h}else c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let y=l.length>1,b,x;t[17]===u?(b=t[18],x=t[19]):(b=()=>u(`previous`),x=()=>u(`next`),t[17]=u,t[18]=b,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>s(null),t[20]=S):S=t[20];let C;t[21]!==c||t[22]!==d||t[23]!==f||t[24]!==p||t[25]!==y||t[26]!==b||t[27]!==x?(C=(0,D.jsx)(c,{title:d,imageSrc:f,imageAlt:p,hasMultipleImages:y,onPrevious:b,onNext:x,onClose:S}),t[21]=c,t[22]=d,t[23]=f,t[24]=p,t[25]=y,t[26]=b,t[27]=x,t[28]=C):C=t[28];let w;return t[29]!==C||t[30]!==m?(w=(0,D.jsxs)(D.Fragment,{children:[m,C]}),t[29]=C,t[30]=m,t[31]=w):w=t[31],w}function W(e){let t=(0,T.c)(8),{enrichment:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i;if(n.status===`idle`||n.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(u,{}),t[0]=e):e=t[0],e}let o;t[1]===n?o=t[2]:(o=V(n),t[1]=n,t[2]=o);let s=o;if(s===null){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[3]=e):e=t[3],e}let c;return t[4]!==r||t[5]!==a||t[6]!==s?(c=(0,D.jsx)(U,{preview:s,fileDiffLabel:r,fitToFrame:a}),t[4]=r,t[5]=a,t[6]=s,t[7]=c):c=t[7],c}function G(e){let t=(0,T.c)(9),{displayMode:n,enrichment:r,fileDiff:i,fileDiffLabel:a,patchText:o,fullFileContents:s,presentation:c,onSelectionAddToChat:l}=e,u;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==s||t[5]!==l||t[6]!==o||t[7]!==c?(u=n===`preview`?(0,D.jsx)(W,{enrichment:r,fileDiffLabel:a,fitToFrame:!0}):(0,D.jsx)(w,{file:i,patchText:o,fullFileContents:s,...c,onSelectionAddToChat:l}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=s,t[5]=l,t[6]=o,t[7]=c,t[8]=u):u=t[8],u}function re(e){let t=(0,T.c)(19),{state:n,presentation:r,svgDisplayMode:i,reservesCollapseGutter:a,onSelectionAddToChat:o}=e,{bodySentinelRef:s,enrichment:c,fileDiff:d,fileDiffLabel:f,isImageCard:p,isSvgPreviewCard:m,shouldGateDeletedDiff:h,shouldRenderDiffView:g,loadDeletedDiff:_,contextExpansion:v,fullFileContents:y,patchText:b}=n,x;t[0]!==v||t[1]!==c||t[2]!==d||t[3]!==f||t[4]!==y||t[5]!==p||t[6]!==m||t[7]!==_||t[8]!==o||t[9]!==b||t[10]!==r||t[11]!==a||t[12]!==h||t[13]!==g||t[14]!==i?(x=h?(0,D.jsxs)(`div`,{className:`flex items-center py-3 pl-2 pr-3 text-xs text-muted-foreground`,children:[a?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,(0,D.jsxs)(`span`,{className:`pl-[1ch]`,children:[(0,D.jsx)(`span`,{children:`This file was deleted.`}),` `,(0,D.jsx)(l,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:_,children:`Load diff`})]})]}):g?p?(0,D.jsx)(W,{enrichment:c,fileDiffLabel:f}):m?(0,D.jsx)(G,{displayMode:i,enrichment:c,fileDiff:d,fileDiffLabel:f,patchText:b,fullFileContents:y,presentation:r,onSelectionAddToChat:o}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(w,{file:d,patchText:b,fullFileContents:y,...r,onSelectionAddToChat:o}),(0,D.jsx)(K,{contextExpansion:v,reservesCollapseGutter:a})]}):(0,D.jsx)(u,{}),t[0]=v,t[1]=c,t[2]=d,t[3]=f,t[4]=y,t[5]=p,t[6]=m,t[7]=_,t[8]=o,t[9]=b,t[10]=r,t[11]=a,t[12]=h,t[13]=g,t[14]=i,t[15]=x):x=t[15];let S;return t[16]!==s||t[17]!==x?(S=(0,D.jsx)(`div`,{ref:s,className:`overflow-hidden rounded-b-lg bg-background`,style:O,children:x}),t[16]=s,t[17]=x,t[18]=S):S=t[18],S}function K(e){let t=(0,T.c)(8),{contextExpansion:n,reservesCollapseGutter:r}=e,{status:i,request:a}=n;if(i===`unavailable`||i===`ready`||i===`prefetching`)return null;let o;t[0]===r?o=t[1]:(o=r?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,t[0]=r,t[1]=o);let s;t[2]!==a||t[3]!==i?(s=(0,D.jsx)(`span`,{className:`pl-[1ch]`,children:i===`loading`?(0,D.jsx)(`span`,{role:`status`,children:`Loading context…`}):(0,D.jsxs)(D.Fragment,{children:[i===`error`?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:`text-destructive`,children:`Couldn't load surrounding context.`}),` `]}):null,(0,D.jsx)(l,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:a,children:i===`error`?`Retry`:`Expand context`})]})}),t[2]=a,t[3]=i,t[4]=s):s=t[4];let c;return t[5]!==o||t[6]!==s?(c=(0,D.jsxs)(`div`,{className:`flex items-center py-2 pl-2 pr-3 text-xs text-muted-foreground`,children:[o,s]}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function q(e){let t=(0,T.c)(7),{stat:n}=e,r;t[0]===n.addedBytes?r=t[1]:(r=n.addedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-added`,children:`+${o(n.addedBytes)}`}),t[0]=n.addedBytes,t[1]=r);let i;t[2]===n.removedBytes?i=t[3]:(i=n.removedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-removed`,children:`-${o(n.removedBytes)}`}),t[2]=n.removedBytes,t[3]=i);let a;return t[4]!==r||t[5]!==i?(a=(0,D.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-xs tabular-nums`,children:[r,i]}),t[4]=r,t[5]=i,t[6]=a):a=t[6],a}function J(e){let t=(0,T.c)(5),{fileLabel:n,isRaw:r,onToggle:a}=e,o=r?`Show image preview for ${n}`:`Show raw SVG diff for ${n}`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,D.jsx)(i,{name:`Code`,"aria-hidden":!0,className:`size-3.5`}),t[0]=s):s=t[0];let c;return t[1]!==r||t[2]!==o||t[3]!==a?(c=(0,D.jsx)(`button`,{type:`button`,className:`inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-pressed:bg-state-active aria-pressed:text-foreground`,onClick:a,"aria-label":o,"aria-pressed":r,children:s}),t[1]=r,t[2]=o,t[3]=a,t[4]=c):c=t[4],c}function Y(e,t){return e.changeKind!==`renamed`&&e.changeKind!==`copied`?null:t&&t!==e.path?{from:t,to:e.path}:null}function X(e){let t=(0,T.c)(53),{model:n,previousPath:r,filePathRoot:o,onOpenFileInEditor:s,onOpenFilePreview:l,isCollapsed:u,onToggleCollapsed:d,hasChanges:f,statSlot:p,actionSlot:m}=e,g=n.changeKind===`added`,_=n.changeKind===`deleted`,v=_?0:n.insertions,S=g?0:n.deletions,w=g||_,E;t[0]!==n||t[1]!==r?(E=Y(n,r),t[0]=n,t[1]=r,t[2]=E):E=t[2];let O=E,k=n.openablePath,ee;t[3]!==o||t[4]!==k?(ee=k?y({path:k,rootPath:o}):null,t[3]=o,t[4]=k,t[5]=ee):ee=t[5];let A=ee,j=!!k,te=u!==void 0&&d!==void 0,M;t[6]!==f||t[7]!==u||t[8]!==n.label||t[9]!==d||t[10]!==te?(M=te?(0,D.jsx)(`button`,{type:`button`,className:a(`inline-flex w-8 shrink-0 items-center justify-center text-muted-foreground transition-colors`,f?`hover:text-foreground`:`cursor-not-allowed opacity-40`),onClick:f?d:void 0,disabled:!f,"aria-label":f?`${u?`Expand`:`Collapse`} ${n.label}`:`${n.label} has no changes to expand`,"aria-expanded":f?!u:void 0,children:(0,D.jsx)(i,{name:`ChevronRight`,className:a(`size-3.5 shrink-0 transition-transform duration-150`,f&&!u&&`rotate-90`)})}):null,t[6]=f,t[7]=u,t[8]=n.label,t[9]=d,t[10]=te,t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=a(`flex min-w-0 items-center gap-1.5`,`pl-[1ch]`),t[12]=N):N=t[12];let P;t[13]===O?P=t[14]:(P=O?(0,D.jsx)(h,{className:`min-w-0 font-mono text-xs leading-5 text-muted-foreground`,title:O.from,children:O.from}):null,t[13]=O,t[14]=P);let F;t[15]===O?F=t[16]:(F=O?(0,D.jsx)(i,{name:`ArrowRight`,"aria-hidden":`true`,className:`size-3 shrink-0 text-subtle-foreground`}):null,t[15]=O,t[16]=F);let I=k??n.path,ne=O?O.to:n.label,L;t[17]!==j||t[18]!==l||t[19]!==k?(L=j&&k&&l?()=>l(k):void 0,t[17]=j,t[18]=l,t[19]=k,t[20]=L):L=t[20];let R;t[21]!==I||t[22]!==ne||t[23]!==L?(R=(0,D.jsx)(C,{path:I,displayName:ne,onClick:L,className:`font-mono font-medium text-foreground`}),t[21]=I,t[22]=ne,t[23]=L,t[24]=R):R=t[24];let z;t[25]!==A||t[26]!==n.label?(z=A?(0,D.jsx)(c,{text:A,label:`Copy path for ${n.label}`,className:`rounded-md hover:bg-state-hover`}):null,t[25]=A,t[26]=n.label,t[27]=z):z=t[27];let B;t[28]!==j||t[29]!==n.label||t[30]!==s||t[31]!==k?(B=j&&k&&s?(0,D.jsx)(x,{onClick:()=>s(k),label:`Open ${n.label} in editor`}):null,t[28]=j,t[29]=n.label,t[30]=s,t[31]=k,t[32]=B):B=t[32];let V;t[33]!==R||t[34]!==z||t[35]!==B||t[36]!==P||t[37]!==F?(V=(0,D.jsxs)(`span`,{className:N,children:[P,F,R,z,B]}),t[33]=R,t[34]=z,t[35]=B,t[36]=P,t[37]=F,t[38]=V):V=t[38];let H;t[39]!==V||t[40]!==M?(H=(0,D.jsxs)(`span`,{className:`flex min-w-0 grow basis-48 items-center`,children:[M,V]}),t[39]=V,t[40]=M,t[41]=H):H=t[41];let U;t[42]!==S||t[43]!==v||t[44]!==w||t[45]!==p?(U=p??(0,D.jsx)(b,{insertions:v,deletions:S,hideZero:w,className:`text-xs`}),t[42]=S,t[43]=v,t[44]=w,t[45]=p,t[46]=U):U=t[46];let W;t[47]!==m||t[48]!==U?(W=(0,D.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[U,m]}),t[47]=m,t[48]=U,t[49]=W):W=t[49];let G;return t[50]!==H||t[51]!==W?(G=(0,D.jsxs)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center justify-between gap-x-2 gap-y-1`,children:[H,W]}),t[50]=H,t[51]=W,t[52]=G):G=t[52],G}var ie=`rounded-lg bg-background py-1.5 pl-2 pr-3 text-xs font-medium text-foreground`;function Z({stickyHeader:e,isBodyHidden:t,isStuck:n,showStuckHeaderEdge:r=!0}){return a(ie,e&&`sticky z-30`,e&&`top-0`,!t&&`rounded-b-none`,n&&`rounded-t-none`,n&&r&&`shadow-[inset_0_1px_0_var(--border)]`)}export{re as a,I as c,Z as i,q as n,U as o,J as r,H as s,X as t};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dh as i,Fh as a,Pn as o,Sc as s,Zt as c,jh as l}from"./index-DCps_qBD.js";import{t as u}from"./code-loading-skeletons-CkiXPS0M.js";import{f as d,l as f,o as p,u as m}from"./git-diff-patch-text-SHpUxhZL.js";import{t as h}from"./truncate-start-Ck1IPV62.js";import{n as g,r as _,t as v}from"./image-lightbox-DhNslR-8.js";import{a as y}from"./absolute-file-path-BxWHDkiV.js";import{n as b}from"./diff-stats-tally-DQHS3tHN.js";import{t as x}from"./open-in-editor-button-tA10Nkqn.js";import{n as S,t as C}from"./file-path-link-D7DFjBWZ.js";import{t as w}from"./DiffHost-xesYsZUt.js";var T=n(),E=e(t(),1),D=e(r(),1),O={contain:`layout paint style`,contentVisibility:`auto`,containIntrinsicSize:`0 600px`};function k(e){return e===`modified`||e===`renamed`||e===`copied`}function ee(e){if(typeof window.requestIdleCallback==`function`){let t=window.requestIdleCallback(e,{timeout:2e3});return()=>window.cancelIdleCallback(t)}let t=window.setTimeout(e,200);return()=>window.clearTimeout(t)}function A(e,t,n){let r=d(e.name)??e.name,i=d(e.prevName)??r,a=t===`added`?{kind:`empty`,path:r}:{kind:`request`,path:t===`renamed`?i:r,side:`old`},o=t===`deleted`?{kind:`empty`,path:r}:{kind:`request`,path:r,side:`new`},s=e.hunks.map(e=>`${e.hunkSpecs??``}:${e.additionStart}:${e.additionCount}:${e.deletionStart}:${e.deletionCount}`).join(`|`);return{identity:[t,j(a),j(o),s,n??``,e.deletionLines.join(``),e.additionLines.join(``)].join(`:`),old:a,new:o}}function j(e){return e.kind===`empty`?`empty:${e.path}`:`request:${e.side}:${e.path}`}function te(e,t){return e.kind===`empty`?Promise.resolve({kind:`text`,file:{name:e.path,contents:``}}):t(e.path,e.side)}function M(e,t){return{old:{path:e.name,content:e.contents},new:{path:t.name,content:t.contents}}}function N(e,t){return e.hunks.length===0&&e.type!==`rename-pure`&&t!==void 0&&f(e.name)}function P(e,t){return e.type!==`rename-pure`&&t!==void 0&&m(e)}function F(e){let t=e.trim();return t.length===0?null:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function I(e){let t=(0,T.c)(75),{fileDiff:n,changeKind:r,onRequestFileContents:i,patchText:a,renderBeforeVisible:o}=e,c=r===`deleted`,l;t[0]!==n||t[1]!==i?(l=N(n,i),t[0]=n,t[1]=i,t[2]=l):l=t[2];let u=l,d;t[3]!==n||t[4]!==i?(d=P(n,i),t[3]=n,t[4]=i,t[5]=d):d=t[5];let f=d,m;t[6]===n?m=t[7]:(m=p(n),t[6]=n,t[7]=m);let h=m,g;t[8]!==r||t[9]!==n||t[10]!==a?(g=A(n,r,a),t[8]=r,t[9]=n,t[10]=a,t[11]=g):g=t[11];let _=g,v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v={initialIsIntersecting:!1,rootMargin:`200px`},t[12]=v):v=t[12];let{ref:y,isIntersecting:b}=S(v),x=(0,E.useRef)(i),C;t[13]===i?C=t[14]:(C=()=>{x.current=i},t[13]=i,t[14]=C),(0,E.useEffect)(C);let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w={status:`idle`},t[15]=w):w=t[15];let[D,O]=(0,E.useState)(w),j=(0,E.useRef)(`idle`),[I,z]=(0,E.useState)(o),[B,V]=(0,E.useState)(!1),[U,W]=(0,E.useState)(0),[G,re]=(0,E.useState)(!1),K=s(),q;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(q=()=>{j.current=`idle`,O({status:`idle`}),V(!1),W(0),re(!1)},t[16]=q):q=t[16];let J;t[17]!==_.identity||t[18]!==u||t[19]!==f?(J=[_.identity,u,f],t[17]=_.identity,t[18]=u,t[19]=f,t[20]=J):J=t[20],(0,E.useEffect)(q,J);let Y,X;t[21]===b?(Y=t[22],X=t[23]):(Y=()=>{b&&z(!0)},X=[b],t[21]=b,t[22]=Y,t[23]=X),(0,E.useEffect)(Y,X);let ie=c&&!u&&!f&&!B,Z=I&&!ie,ae=u||f,oe;t[24]!==r||t[25]!==n||t[26]!==ae||t[27]!==i||t[28]!==a?(oe=!ae&&i!==void 0&&a!==void 0&&n.hunks.length>0&&k(r),t[24]=r,t[25]=n,t[26]=ae,t[27]=i,t[28]=a,t[29]=oe):oe=t[29];let Q=oe,$=Z&&(ae||Q&&U>0),se,ce;t[30]!==Q||t[31]!==U||t[32]!==K||t[33]!==Z?(se=()=>{if(!(K||!Z||!Q||U>0))return ee(()=>{W(L)})},ce=[Q,U,K,Z],t[30]=Q,t[31]=U,t[32]=K,t[33]=Z,t[34]=se,t[35]=ce):(se=t[34],ce=t[35]),(0,E.useEffect)(se,ce);let le;t[36]!==_.new||t[37]!==_.old||t[38]!==f||t[39]!==$?(le=()=>{if(!$||j.current!==`idle`)return;let e=x.current;if(!e)return;let t=!1;return j.current=`loading`,O({status:`loading`}),Promise.all([te(_.old,e),te(_.new,e)]).then(e=>{let[n,r]=e;if(t)return;let i=n?.kind===`image`?n:null,a=r?.kind===`image`?r:null;if(i!==null||a!==null){j.current=`ready-image`,O({status:`ready-image`,oldImageUrl:i?.dataUrl??null,newImageUrl:a?.dataUrl??null,oldSizeBytes:i?.sizeBytes??null,newSizeBytes:a?.sizeBytes??null});return}if(n?.kind!==`text`||r?.kind!==`text`){j.current=`unavailable`,O({status:`unavailable`});return}let o=M(n.file,r.file);if(f){j.current=`ready-svg`,O({status:`ready-svg`,fullFileContents:o,oldImageUrl:F(n.file.contents),newImageUrl:F(r.file.contents)});return}j.current=`ready`,O({status:`ready`,fullFileContents:o})}).catch(()=>{t||(j.current=`error`,O({status:`error`}))}),()=>{t=!0,j.current===`loading`&&(j.current=`idle`)}},t[36]=_.new,t[37]=_.old,t[38]=f,t[39]=$,t[40]=le):le=t[40];let ue;t[41]!==U||t[42]!==_||t[43]!==n||t[44]!==f||t[45]!==a||t[46]!==$?(ue=[U,_,n,f,a,$],t[41]=U,t[42]=_,t[43]=n,t[44]=f,t[45]=a,t[46]=$,t[47]=ue):ue=t[47],(0,E.useEffect)(le,ue);let de;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(de=()=>{j.current===`error`&&(j.current=`idle`,O({status:`idle`})),re(!0),W(ne)},t[48]=de):de=t[48];let fe=de,pe=U>0,me=!K,he;t[49]!==Q||t[50]!==D.status||t[51]!==G||t[52]!==pe||t[53]!==me?(he=R({canExpandContext:Q,contextRequested:pe,enrichmentStatus:D.status,isPrefetchedAutomatically:me,isRequestedByUser:G}),t[49]=Q,t[50]=D.status,t[51]=G,t[52]=pe,t[53]=me,t[54]=he):he=t[54];let ge=he,_e;t[55]===ge?_e=t[56]:(_e={status:ge,request:fe},t[55]=ge,t[56]=_e);let ve=_e,ye=D.status===`ready`||D.status===`ready-svg`?D.fullFileContents:null,be;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(be=()=>{V(!0),z(!0)},t[57]=be):be=t[57];let xe=be,Se;t[58]!==r||t[59]!==D||t[60]!==u?(Se=u&&D.status===`ready-image`?H(D,r):null,t[58]=r,t[59]=D,t[60]=u,t[61]=Se):Se=t[61];let Ce=Se,we;return t[62]!==y||t[63]!==ve||t[64]!==D||t[65]!==n||t[66]!==h||t[67]!==ye||t[68]!==Ce||t[69]!==u||t[70]!==f||t[71]!==a||t[72]!==ie||t[73]!==Z?(we={bodySentinelRef:y,enrichment:D,fileDiff:n,fileDiffLabel:h,isImageCard:u,isSvgPreviewCard:f,shouldGateDeletedDiff:ie,shouldRenderDiffView:Z,loadDeletedDiff:xe,imageSizeStat:Ce,contextExpansion:ve,fullFileContents:ye,patchText:a},t[62]=y,t[63]=ve,t[64]=D,t[65]=n,t[66]=h,t[67]=ye,t[68]=Ce,t[69]=u,t[70]=f,t[71]=a,t[72]=ie,t[73]=Z,t[74]=we):we=t[74],we}function ne(e){return e+1}function L(e){return e===0?1:e}function R({canExpandContext:e,contextRequested:t,enrichmentStatus:n,isPrefetchedAutomatically:r,isRequestedByUser:i}){if(!e)return`unavailable`;let a=i?`loading`:`prefetching`;switch(n){case`idle`:return t?a:r?`prefetching`:`idle`;case`loading`:return a;case`ready`:return`ready`;case`error`:return`error`;case`ready-image`:case`ready-svg`:case`unavailable`:return`unavailable`;default:return n}}function z(e,t){let n=e!==null&&t!==null,r=[];return e!==null&&r.push({url:e,caption:n?`Old`:null}),t!==null&&r.push({url:t,caption:n?`New`:null}),r}function B(e,t){return t.caption===null?e:`${e} (${t.caption.toLowerCase()})`}function V(e){return e.status!==`ready-image`&&e.status!==`ready-svg`?null:{oldImageUrl:e.oldImageUrl,newImageUrl:e.newImageUrl}}function H(e,t){let n=t===`deleted`?null:e.newSizeBytes,r=t===`added`?null:e.oldSizeBytes;return n===null&&r===null?null:{addedBytes:n,removedBytes:r}}function U(e){let t=(0,T.c)(32),{preview:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i,[o,s]=(0,E.useState)(null),c,l,u,d,f,p,m,h;if(t[0]!==o||t[1]!==r||t[2]!==a||t[3]!==n.newImageUrl||t[4]!==n.oldImageUrl){h=Symbol.for(`react.early_return_sentinel`);bb0:{if(l=z(n.oldImageUrl,n.newImageUrl),l.length===0){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[13]=e):e=t[13],h=e;break bb0}let e=o===null?void 0:l[o];u=e=>{s(t=>t===null?null:_({currentIndex:t,direction:e,itemCount:l.length}))};let i;t[14]!==r||t[15]!==a?(i=(e,t)=>(0,D.jsxs)(`figure`,{className:`min-w-0 max-w-full`,children:[(0,D.jsx)(`button`,{type:`button`,className:a?`flex h-64 w-full cursor-zoom-in items-center justify-center rounded-md border border-border bg-surface-recessed p-3`:`block max-w-full cursor-zoom-in`,onClick:()=>s(t),children:(0,D.jsx)(`img`,{src:e.url,alt:B(r,e),style:v,className:a?`block h-full w-full object-contain`:`block max-h-80 max-w-full rounded-md border border-border object-contain`})}),e.caption===null?null:(0,D.jsx)(`figcaption`,{className:`mt-1 text-xs text-muted-foreground`,children:e.caption})]},e.url),t[14]=r,t[15]=a,t[16]=i):i=t[16],m=(0,D.jsx)(`div`,{className:`@container/diff-preview min-w-0`,children:(0,D.jsx)(`div`,{className:a?l.length>1?`grid grid-cols-1 gap-3 px-3 py-3 @min-[32rem]/diff-preview:grid-cols-2`:`grid grid-cols-1 gap-3 px-3 py-3`:`flex flex-col items-start gap-3 px-3 py-3 @min-[32rem]/diff-preview:flex-row`,children:l.map(i)})}),c=g,d=`${r} image preview`,f=e?.url??null,p=e?B(r,e):r}t[0]=o,t[1]=r,t[2]=a,t[3]=n.newImageUrl,t[4]=n.oldImageUrl,t[5]=c,t[6]=l,t[7]=u,t[8]=d,t[9]=f,t[10]=p,t[11]=m,t[12]=h}else c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12];if(h!==Symbol.for(`react.early_return_sentinel`))return h;let y=l.length>1,b,x;t[17]===u?(b=t[18],x=t[19]):(b=()=>u(`previous`),x=()=>u(`next`),t[17]=u,t[18]=b,t[19]=x);let S;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>s(null),t[20]=S):S=t[20];let C;t[21]!==c||t[22]!==d||t[23]!==f||t[24]!==p||t[25]!==y||t[26]!==b||t[27]!==x?(C=(0,D.jsx)(c,{title:d,imageSrc:f,imageAlt:p,hasMultipleImages:y,onPrevious:b,onNext:x,onClose:S}),t[21]=c,t[22]=d,t[23]=f,t[24]=p,t[25]=y,t[26]=b,t[27]=x,t[28]=C):C=t[28];let w;return t[29]!==C||t[30]!==m?(w=(0,D.jsxs)(D.Fragment,{children:[m,C]}),t[29]=C,t[30]=m,t[31]=w):w=t[31],w}function W(e){let t=(0,T.c)(8),{enrichment:n,fileDiffLabel:r,fitToFrame:i}=e,a=i===void 0?!1:i;if(n.status===`idle`||n.status===`loading`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(u,{}),t[0]=e):e=t[0],e}let o;t[1]===n?o=t[2]:(o=V(n),t[1]=n,t[2]=o);let s=o;if(s===null){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,D.jsx)(`div`,{className:`px-3 py-3 text-xs text-muted-foreground`,children:`No preview available for this image.`}),t[3]=e):e=t[3],e}let c;return t[4]!==r||t[5]!==a||t[6]!==s?(c=(0,D.jsx)(U,{preview:s,fileDiffLabel:r,fitToFrame:a}),t[4]=r,t[5]=a,t[6]=s,t[7]=c):c=t[7],c}function G(e){let t=(0,T.c)(9),{displayMode:n,enrichment:r,fileDiff:i,fileDiffLabel:a,patchText:o,fullFileContents:s,presentation:c,onSelectionAddToChat:l}=e,u;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==s||t[5]!==l||t[6]!==o||t[7]!==c?(u=n===`preview`?(0,D.jsx)(W,{enrichment:r,fileDiffLabel:a,fitToFrame:!0}):(0,D.jsx)(w,{file:i,patchText:o,fullFileContents:s,...c,onSelectionAddToChat:l}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=s,t[5]=l,t[6]=o,t[7]=c,t[8]=u):u=t[8],u}function re(e){let t=(0,T.c)(19),{state:n,presentation:r,svgDisplayMode:i,reservesCollapseGutter:a,onSelectionAddToChat:o}=e,{bodySentinelRef:s,enrichment:c,fileDiff:d,fileDiffLabel:f,isImageCard:p,isSvgPreviewCard:m,shouldGateDeletedDiff:h,shouldRenderDiffView:g,loadDeletedDiff:_,contextExpansion:v,fullFileContents:y,patchText:b}=n,x;t[0]!==v||t[1]!==c||t[2]!==d||t[3]!==f||t[4]!==y||t[5]!==p||t[6]!==m||t[7]!==_||t[8]!==o||t[9]!==b||t[10]!==r||t[11]!==a||t[12]!==h||t[13]!==g||t[14]!==i?(x=h?(0,D.jsxs)(`div`,{className:`flex items-center py-3 pl-2 pr-3 text-xs text-muted-foreground`,children:[a?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,(0,D.jsxs)(`span`,{className:`pl-[1ch]`,children:[(0,D.jsx)(`span`,{children:`This file was deleted.`}),` `,(0,D.jsx)(l,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:_,children:`Load diff`})]})]}):g?p?(0,D.jsx)(W,{enrichment:c,fileDiffLabel:f}):m?(0,D.jsx)(G,{displayMode:i,enrichment:c,fileDiff:d,fileDiffLabel:f,patchText:b,fullFileContents:y,presentation:r,onSelectionAddToChat:o}):(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(w,{file:d,patchText:b,fullFileContents:y,...r,onSelectionAddToChat:o}),(0,D.jsx)(K,{contextExpansion:v,reservesCollapseGutter:a})]}):(0,D.jsx)(u,{}),t[0]=v,t[1]=c,t[2]=d,t[3]=f,t[4]=y,t[5]=p,t[6]=m,t[7]=_,t[8]=o,t[9]=b,t[10]=r,t[11]=a,t[12]=h,t[13]=g,t[14]=i,t[15]=x):x=t[15];let S;return t[16]!==s||t[17]!==x?(S=(0,D.jsx)(`div`,{ref:s,className:`overflow-hidden rounded-b-lg bg-background`,style:O,children:x}),t[16]=s,t[17]=x,t[18]=S):S=t[18],S}function K(e){let t=(0,T.c)(8),{contextExpansion:n,reservesCollapseGutter:r}=e,{status:i,request:a}=n;if(i===`unavailable`||i===`ready`||i===`prefetching`)return null;let o;t[0]===r?o=t[1]:(o=r?(0,D.jsx)(`span`,{"aria-hidden":!0,className:`w-8 shrink-0`}):null,t[0]=r,t[1]=o);let s;t[2]!==a||t[3]!==i?(s=(0,D.jsx)(`span`,{className:`pl-[1ch]`,children:i===`loading`?(0,D.jsx)(`span`,{role:`status`,children:`Loading context…`}):(0,D.jsxs)(D.Fragment,{children:[i===`error`?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:`text-destructive`,children:`Couldn't load surrounding context.`}),` `]}):null,(0,D.jsx)(l,{type:`button`,variant:`link`,size:`sm`,className:`h-auto p-0 text-xs underline underline-offset-4 hover:underline`,onClick:a,children:i===`error`?`Retry`:`Expand context`})]})}),t[2]=a,t[3]=i,t[4]=s):s=t[4];let c;return t[5]!==o||t[6]!==s?(c=(0,D.jsxs)(`div`,{className:`flex items-center py-2 pl-2 pr-3 text-xs text-muted-foreground`,children:[o,s]}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function q(e){let t=(0,T.c)(7),{stat:n}=e,r;t[0]===n.addedBytes?r=t[1]:(r=n.addedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-added`,children:`+${o(n.addedBytes)}`}),t[0]=n.addedBytes,t[1]=r);let i;t[2]===n.removedBytes?i=t[3]:(i=n.removedBytes===null?null:(0,D.jsx)(`span`,{className:`text-diff-removed`,children:`-${o(n.removedBytes)}`}),t[2]=n.removedBytes,t[3]=i);let a;return t[4]!==r||t[5]!==i?(a=(0,D.jsxs)(`span`,{className:`flex shrink-0 items-center gap-1 whitespace-nowrap text-xs tabular-nums`,children:[r,i]}),t[4]=r,t[5]=i,t[6]=a):a=t[6],a}function J(e){let t=(0,T.c)(5),{fileLabel:n,isRaw:r,onToggle:a}=e,o=r?`Show image preview for ${n}`:`Show raw SVG diff for ${n}`,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,D.jsx)(i,{name:`Code`,"aria-hidden":!0,className:`size-3.5`}),t[0]=s):s=t[0];let c;return t[1]!==r||t[2]!==o||t[3]!==a?(c=(0,D.jsx)(`button`,{type:`button`,className:`inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring aria-pressed:bg-state-active aria-pressed:text-foreground`,onClick:a,"aria-label":o,"aria-pressed":r,children:s}),t[1]=r,t[2]=o,t[3]=a,t[4]=c):c=t[4],c}function Y(e,t){return e.changeKind!==`renamed`&&e.changeKind!==`copied`?null:t&&t!==e.path?{from:t,to:e.path}:null}function X(e){let t=(0,T.c)(53),{model:n,previousPath:r,filePathRoot:o,onOpenFileInEditor:s,onOpenFilePreview:l,isCollapsed:u,onToggleCollapsed:d,hasChanges:f,statSlot:p,actionSlot:m}=e,g=n.changeKind===`added`,_=n.changeKind===`deleted`,v=_?0:n.insertions,S=g?0:n.deletions,w=g||_,E;t[0]!==n||t[1]!==r?(E=Y(n,r),t[0]=n,t[1]=r,t[2]=E):E=t[2];let O=E,k=n.openablePath,ee;t[3]!==o||t[4]!==k?(ee=k?y({path:k,rootPath:o}):null,t[3]=o,t[4]=k,t[5]=ee):ee=t[5];let A=ee,j=!!k,te=u!==void 0&&d!==void 0,M;t[6]!==f||t[7]!==u||t[8]!==n.label||t[9]!==d||t[10]!==te?(M=te?(0,D.jsx)(`button`,{type:`button`,className:a(`inline-flex w-8 shrink-0 items-center justify-center text-muted-foreground transition-colors`,f?`hover:text-foreground`:`cursor-not-allowed opacity-40`),onClick:f?d:void 0,disabled:!f,"aria-label":f?`${u?`Expand`:`Collapse`} ${n.label}`:`${n.label} has no changes to expand`,"aria-expanded":f?!u:void 0,children:(0,D.jsx)(i,{name:`ChevronRight`,className:a(`size-3.5 shrink-0 transition-transform duration-150`,f&&!u&&`rotate-90`)})}):null,t[6]=f,t[7]=u,t[8]=n.label,t[9]=d,t[10]=te,t[11]=M):M=t[11];let N;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(N=a(`flex min-w-0 items-center gap-1.5`,`pl-[1ch]`),t[12]=N):N=t[12];let P;t[13]===O?P=t[14]:(P=O?(0,D.jsx)(h,{className:`min-w-0 font-mono text-xs leading-5 text-muted-foreground`,title:O.from,children:O.from}):null,t[13]=O,t[14]=P);let F;t[15]===O?F=t[16]:(F=O?(0,D.jsx)(i,{name:`ArrowRight`,"aria-hidden":`true`,className:`size-3 shrink-0 text-subtle-foreground`}):null,t[15]=O,t[16]=F);let I=k??n.path,ne=O?O.to:n.label,L;t[17]!==j||t[18]!==l||t[19]!==k?(L=j&&k&&l?()=>l(k):void 0,t[17]=j,t[18]=l,t[19]=k,t[20]=L):L=t[20];let R;t[21]!==I||t[22]!==ne||t[23]!==L?(R=(0,D.jsx)(C,{path:I,displayName:ne,onClick:L,className:`font-mono font-medium text-foreground`}),t[21]=I,t[22]=ne,t[23]=L,t[24]=R):R=t[24];let z;t[25]!==A||t[26]!==n.label?(z=A?(0,D.jsx)(c,{text:A,label:`Copy path for ${n.label}`,className:`rounded-md hover:bg-state-hover`}):null,t[25]=A,t[26]=n.label,t[27]=z):z=t[27];let B;t[28]!==j||t[29]!==n.label||t[30]!==s||t[31]!==k?(B=j&&k&&s?(0,D.jsx)(x,{onClick:()=>s(k),label:`Open ${n.label} in editor`}):null,t[28]=j,t[29]=n.label,t[30]=s,t[31]=k,t[32]=B):B=t[32];let V;t[33]!==R||t[34]!==z||t[35]!==B||t[36]!==P||t[37]!==F?(V=(0,D.jsxs)(`span`,{className:N,children:[P,F,R,z,B]}),t[33]=R,t[34]=z,t[35]=B,t[36]=P,t[37]=F,t[38]=V):V=t[38];let H;t[39]!==V||t[40]!==M?(H=(0,D.jsxs)(`span`,{className:`flex min-w-0 grow basis-48 items-center`,children:[M,V]}),t[39]=V,t[40]=M,t[41]=H):H=t[41];let U;t[42]!==S||t[43]!==v||t[44]!==w||t[45]!==p?(U=p??(0,D.jsx)(b,{insertions:v,deletions:S,hideZero:w,className:`text-xs`}),t[42]=S,t[43]=v,t[44]=w,t[45]=p,t[46]=U):U=t[46];let W;t[47]!==m||t[48]!==U?(W=(0,D.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2`,children:[U,m]}),t[47]=m,t[48]=U,t[49]=W):W=t[49];let G;return t[50]!==H||t[51]!==W?(G=(0,D.jsxs)(`div`,{className:`flex w-full min-w-0 flex-wrap items-center justify-between gap-x-2 gap-y-1`,children:[H,W]}),t[50]=H,t[51]=W,t[52]=G):G=t[52],G}var ie=`rounded-lg bg-background py-1.5 pl-2 pr-3 text-xs font-medium text-foreground`;function Z({stickyHeader:e,isBodyHidden:t,isStuck:n,showStuckHeaderEdge:r=!0}){return a(ie,e&&`sticky z-30`,e&&`top-0`,!t&&`rounded-b-none`,n&&`rounded-t-none`,n&&r&&`shadow-[inset_0_1px_0_var(--border)]`)}export{re as a,I as c,Z as i,q as n,U as o,J as r,H as s,X as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dh as i,Fh as a,jh as o}from"./index-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{hi as t,kr as n,ri as r}from"./boot-vendor-CKEhulXz.js";import{Dh as i,Fh as a,jh as o}from"./index-DCps_qBD.js";import{o as s}from"./queued-editor-typeahead-layout-DTUSPVuA.js";var c=n(),l=e(t(),1),u=e(r(),1),d=`bg-background shadow-xs`,f=`cursor-pointer text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-60`,p=a(`inline-flex items-center whitespace-nowrap rounded border border-border px-1.5 py-0.5 text-xs`,d,f);a(`text-xs`,f,`focus-visible:z-10`);var m=(0,l.forwardRef)(function(e,t){let n=(0,c.c)(11),r,i,o;n[0]===e?(r=n[1],i=n[2],o=n[3]):({className:r,type:o,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=o);let s=o===void 0?`button`:o,l;n[4]===r?l=n[5]:(l=a(p,r),n[4]=r,n[5]=l);let d;return n[6]!==i||n[7]!==t||n[8]!==l||n[9]!==s?(d=(0,u.jsx)(`button`,{ref:t,type:s,className:l,...i}),n[6]=i,n[7]=t,n[8]=l,n[9]=s,n[10]=d):d=n[10],d}),h=`relative bg-surface-raised-solid before:pointer-events-none before:absolute before:inset-y-0 before:right-full before:w-4 before:bg-gradient-to-r before:from-transparent before:to-surface-raised-solid before:content-['']`;function g(e){let t=(0,c.c)(4),{children:n,hideInCompact:r,hideInTiny:i}=e,a=r===void 0?!1:r,o=i===void 0?!0:i,s=a?``:void 0,l=o?``:void 0,d;return t[0]!==n||t[1]!==s||t[2]!==l?(d=(0,u.jsx)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1.5 pr-2 text-xs text-muted-foreground`,"data-promptbox-hide-compact":s,"data-promptbox-hide-tiny":l,children:n}),t[0]=n,t[1]=s,t[2]=l,t[3]=d):d=t[3],d}function _(e){let t=(0,c.c)(27),{cancelLabel:n,children:r,label:l,onCancel:d,variant:f}=e,p=f===void 0?`embedded`:f,m=p===`cap`?`h-8 px-3`:`mb-1.5 pl-1`,h;t[0]===m?h=t[1]:(h=a(`flex min-h-7 items-center gap-1.5 text-xs text-subtle-foreground`,m),t[0]=m,t[1]=h);let g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,u.jsx)(i,{name:`Edit`,className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[2]=g):g=t[2];let _=p===`cap`&&`font-medium`,v;t[3]===_?v=t[4]:(v=a(`shrink-0`,_),t[3]=_,t[4]=v);let y;t[5]!==l||t[6]!==v?(y=(0,u.jsx)(`span`,{className:v,children:l}),t[5]=l,t[6]=v,t[7]=y):y=t[7];let b;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,u.jsx)(i,{name:`X`,className:`size-3`,"aria-hidden":!0}),t[8]=b):b=t[8];let x;t[9]!==n||t[10]!==d?(x=(0,u.jsx)(o,{type:`button`,size:`icon`,variant:`ghost`,className:`ml-auto size-6 shrink-0 text-subtle-foreground`,onClick:d,"aria-label":n,children:b}),t[9]=n,t[10]=d,t[11]=x):x=t[11];let S;t[12]!==h||t[13]!==y||t[14]!==x?(S=(0,u.jsxs)(`div`,{className:h,children:[g,y,x]}),t[12]=h,t[13]=y,t[14]=x,t[15]=S):S=t[15];let C=S;if(p===`cap`){let e;t[16]!==C||t[17]!==l?(e=(0,u.jsx)(s,{ariaLabel:l,className:`relative z-10 -mb-5 rounded-xl rounded-b-none border-b-0 bg-surface-raised-solid pb-3 shadow-lift`,children:C}),t[16]=C,t[17]=l,t[18]=e):e=t[18];let n;t[19]===r?n=t[20]:(n=(0,u.jsx)(`div`,{className:`relative z-20`,children:r}),t[19]=r,t[20]=n);let i;return t[21]!==e||t[22]!==n?(i=(0,u.jsxs)(`div`,{className:`relative z-20 space-y-2`,"data-inline-message-editor-frame":`cap`,children:[e,n]}),t[21]=e,t[22]=n,t[23]=i):i=t[23],i}let w;return t[24]!==r||t[25]!==C?(w=(0,u.jsxs)(`div`,{className:`relative z-20`,"data-inline-message-editor-frame":`embedded`,children:[C,r]}),t[24]=r,t[25]=C,t[26]=w):w=t[26],w}export{m as i,g as n,h as r,_ as t};
|